NAME
Amazon::SQS::Consumer - Receive messages from an Amazon Simple Queue Service (SQS) queue
SYNOPSIS
use Amazon::SQS::Consumer;
my $in_queue = new Amazon::SQS::Consumer
AWSAccessKeyId => 'PUBLIC_KEY_HERE',
SecretAccessKey => 'SECRET_KEY_HERE',
queue => 'YourInputQueue';
while ( my $item = $in_queue->next ) {
# Do stuff with the item
}
METHODS
new(%params)
This is the constructor, it will return you an Amazon::SQS::Consumer object to work with. It takes these parameters:
- AWSAccessKeyId (required)
-
Your AWS access key.
- SecretAccessKey (required)
-
Your secret key, WARNING! don't give this out or someone will be able to use your account and incur charges on your behalf.
- queue (required)
-
The URL of the queue to receive messages from.
- wait_seconds (optional)
-
The number of seconds to wait for a new message when the queue is empty.
- debug (optional)
-
A flag to turn on debugging. It is turned off by default.
next()
This will receive a message from this Publisher's queue. When the queue is empty it will wait a new message for wait_seconds seconds.
AUTHOR
Nic Wolff, <nic@angel.net>
BUGS
Please report any bugs or feature requests to bug-amazon-sqs-producerconsumer at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Amazon-SQS-ProducerConsumer. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Amazon::SQS::ProducerConsumer
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Amazon-SQS-ProducerConsumer
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2011 Nic Wolff.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.