NAME
Amazon::SQS::Producer - Publish messages to an Amazon Simple Queue Service (SQS) queue
SYNOPSIS
use Amazon::SQS::Producer;
my $out_queue = new Amazon::SQS::Producer
AWSAccessKeyId => 'PUBLIC_KEY_HERE',
SecretAccessKey => 'SECRET_KEY_HERE',
ResourceURIPrefix => 'http://queue.amazonaws.com/YOUR_QUEUE_KEY/',
queue => 'YourOutputQueue',
consumer => 'ConsumerForOutputQueue';
$out_queue->publish(
$existingObjectRef,
url => $enclosure_URL,
pubdate => $pubDate,
title => $title,
description => $description,
rss_guid => $guid,
);
METHODS
new(%params)
This is the constructor, it will return you an Amazon::SQS::Producer 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.
- ResourceURIPrefix (optional)
-
The beginnning of the URI that defines all your SQS resources. If this is defined, then you can refer to your queues by name, without giving the whole URI every time.
- queue (required)
-
The URL of the queue to publish messages to. If you gave the ResourceURIPrefix parameter above, then this can just be the queue name, rather than the whole URI.
- consumer (optional)
-
The name of an executable that will consume messages from the queue we're publishing to. An instance will be launched after the each message is published, up to the maximum set by...
- start_consumers (optional)
-
The maximum number of consumer instance to launch.
- debug (optional)
-
A flag to turn on debugging. It is turned off by default.
publish(%params)
This will publish a message to this Publisher's queue, and start a consumer if this is the first message this Publisher has published. The message body will be a JSON representaton of the method's argument hash. If the first argument is a reference to a hash it will be dereferenced and merged with the other parameters given.
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.