Amazon-SQS-Client
view release on metacpan or search on metacpan
lib/Amazon/SQS/Config.pm view on Meta::CPAN
sleep time is incremented by this amount up to the C<max_wait> value.
=item max_error_retry
Number of retries for invoking any AWS API.
default: 3
=item max_messages
Maximum number of messages to return from the receive message
API. Current maximum value is 1. This may change in future versions.
=item max_wait
The maxium amount of time in seconds to sleep.
default: 60s
=item name
The name (not the URL) of the queue.
=item url
The queue URL.
=item visibility_timeout
From the AWS documentation:
I<You can provide the VisibilityTimeout parameter in your request. The
parameter is applied to the messages that Amazon SQS returns in the
response. If you don't include the parameter, the overall visibility
timeout for the queue is used for the returned messages. The default
visibility timeout for a queue is 30 seconds.>
default: 30
=item wait_time
The number of seconds to wait for a message (long polling). The
maximum value is 20 seconds.
The advantage of using long polling is that your messages will be
received almost as soon as they are available on the queue. The
disadvantage is that you may incur more costs if you are making a lot
of calls to receive messages on a queue that is infrequently used. In
that case you may want to consider short polling with an C<interval>
value. This will result in far fewer calls to receive messages but may
delay receipt of messages up to the max wait time.
I<NOTE: Using long polling instead of short polling will result in your daemon
blocking until the ReceiveMessage API returns. Signals received during
this period not be may not be immediately acting upon.>
=back
=head2 aws
This section describes the SQS endpoint and your API credentials. By
default, the F<QueueDaemon.pl> script will use the
L<Amazon::Credentials> class to find your credentials so you do not
need to configure them here.
[aws]
access_key_id = <Your Access Key ID>
secret_access_key = <Your Secret Access Key>
endpoint_url = https://sqs.amazonaws.com
=over 5
=item access_key_id
Your AWS Access key value.
=item secrete_access_key
Your AWS Secret Access key value.
=item endpoint_url
The AWS SQS endpoint.
default: https://queue.amazonaws.com
=back
=head2 log
The log section describe how the F<QueueDaemon.pl> script will log
messages. The script instantiates a L<Log::Log4perl> logger
automatically for you that will log to the parent's STDERR. See note
below regarding how the daemonization process closes STDOUT, STDERR.
[log]
level = debug
file = /tmp/amazon_sqs.log
When you daemonize the script, if either C<stdout> or C<stderr> is set
the parent's STDOUT or STDERR will be closed and then reopened using
those settings. If these are not set, then they will not be
closed. The closing STDERR will stop the C<Log::Log4perl> logger.
=over 5
=item level
C<Log::Log4perl> logging level ('trace', 'debug', 'info', 'warn', 'error').
=item file
Name of a log file for C<Log::Log4perl> messages. You can also use the
values of 'stdout' or 'stderr' to log to STDOUT and STDERR.
=back
I<WARNING: You should probably make sure that the F<.ini> file is properly
protected with restrictive permissions if you place credentials in
this file.>
=head1 METHODS AND SUBROUTINES
=head2 new
new( file => filename | handle )
You can pass either the name of a file or a file handle to the new
method. See L<Config::IniFiles>.
=over
=item file
The name of a F<.ini> style file that contains the AWS SQS configuration information or
handle to an open F<.ini> style file.
=back
=head1 SEE ALSO
L<Config::IniFiles>
=head1 AUTHOR
Rob Lauer - <bigfoot@cpan.org>
=cut
1;
( run in 0.562 second using v1.01-cache-2.11-cpan-39bf76dae61 )