Amazon-SQS-Client
view release on metacpan or search on metacpan
lib/Amazon/SQS/Config.pm view on Meta::CPAN
=back
=head2 queue
This section decribes the queue.
[queue]
interval = 2
max_wait = 20
max_messages = 1
visibility_timeout = 60
max_error_retry = 3
name = <your-queue-name>
url = https://sqs.us-east-1.amazonaws.com/<your-account-number>/<your-queue-name>
=over 5
=item create_queue
Set to 'yes' if you want the F<QueueDaemon.pl> script to create the
queue if it does not exist. Set the C<name> option to just the name of
the queue (not the URL).
=item interval
Number of seconds to wait after no message is received. The script
will sleep for this amount of time before attempting to receive
another message. If after waking there are still no messages, the
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
( run in 1.042 second using v1.01-cache-2.11-cpan-39bf76dae61 )