Amazon-SQS-Client
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
bin/QueueDaemon.pl view on Meta::CPAN
########################################################################
sub get_options {
########################################################################
my @option_specs = qw(
config|c=s
create-queue|C
daemonize|d!
delete-when|D=s
exit-when|E=s
endpoint_url|e=s
help|h
logfile|L=s
loglevel|l=s
max-children|m=i
max-sleep-time=i
max-messages=i
pidfile|p=s
queue|q=s
queue-interval|I=i
handler|H=s
bin/create-queue.pl view on Meta::CPAN
return 0;
}
########################################################################
sub init_client {
########################################################################
my ($options) = @_;
my $client_options = {
ServiceURL => $options->{'endpoint-url'},
$options->{debug} ? ( loglevel => 'debug' ) : ( loglevel => 'info' ),
};
my @credentials = ( $ENV{AWS_ACCESS_KEY_ID}, $ENV{AWS_SECRET_ACCESS_KEY} );
return Amazon::SQS::Client->new( @credentials, $client_options );
}
########################################################################
sub main {
########################################################################
my @option_specs = qw(
debug|d
dlq!
delay-seconds|D=i
endpoint-url|e=s
help|h
max-receive-count|c=i
maximum-message-size|S=i
message-retention-period|p=i
queue|q=s
receive-message-wait-time-seconds|w=i
visibility-timeout|v=i
);
my %options = (
dlq => 1,
'delay-seconds' => $DEFAULT_DELAY_SECONDS,
'endpoint-url' => $DEFAULT_ENDPOINT_URL,
'max-receive-count' => $DEFAULT_MAX_RECEIVE_COUNT,
'endpoint-url' => $DEFAULT_ENDPOINT_URL,
'maximum-message-size' => $DEFAULT_MAXIMUM_MESSAGE_SIZE,
'message-retention-period' => $DEFAULT_MESSAGE_RETENTION_PERIOD,
'receive-message-wait-time-seconds' => $DEFAULT_RECEIVE_MESSAGE_WAIT_TIME_SECONDS,
);
my %dispatch = (
attributes => \&command_attributes,
create => \&command_create,
'send-message' => \&command_send_message,
'receive-message' => \&command_receive_message,
lib/Amazon/SQS/QueueHandler.pm view on Meta::CPAN
use CGI::Simple;
use JSON;
use List::Util qw(none max);
__PACKAGE__->follow_best_practice;
__PACKAGE__->mk_accessors(
qw(
config
create_queue
credentials
endpoint_url
logger
max_error_retry
message
message_id
message_type
message_body
raw_message
receipt_handle
request
region
share/DeleteMessage.pm view on Meta::CPAN
=head1 USAGE
example.pl [-f config-file] DeleteMessage receipt-handle [queue-url]
Note: If you do not set the queue URL in the config, then you must
provide it on the command line.
=head1 OPTIONS
--endpoint-url, -e API endpoint, default: https://queue.amazonaws.com
--file, -f Name of a .ini configuration file
--help, -h help
=cut
share/DeleteQueue.pm view on Meta::CPAN
=head1 USAGE
example.pl [-f config-file] DeleteQueue [queue-url]
Note: If you do not set the queue URL in the config, then you must
provide it on the command line.
=head1 OPTIONS
--endpoint-url, -e API endpoint, default: https://queue.amazonaws.com
--file, -f Name of a .ini configuration file
--help, -h help
=cut
share/GetQueueAttributes.pm view on Meta::CPAN
example.pl [-f config-file] GetQueueAttributes attributes [queue-url]
attributes is a list of attributes. Default: 'All'
Note: If you do not set the queue URL in the config, then you must
provide it on the command line.
=head1 OPTIONS
--endpoint-url, -e API endpoint, default: https://queue.amazonaws.com
--file, -f Name of a .ini configuration file help, -h help
=cut
share/ReceiveMessage.pm view on Meta::CPAN
Note: If you do not set the queue URL in the config, then you must
provide it on the command line.
Will return the message and receipt handle. Use the receipt handle to
delete the message.
example.pl -f aws-sqs.ini SendMessage "Hello World!"
=head1 OPTIONS
--endpoint-url, -e API endpoint, default: https://queue.amazonaws.com
--file, -f Name of a .ini configuration file
--help, -h help
=cut
share/RemovePermission.pm view on Meta::CPAN
=head1 USAGE
example.pl [-f config-file] RemovePermission label [queue-url]
Note: If you do not set the queue URL in the config, then you must
provide it on the command line.
=head1 OPTIONS
--endpoint-url, -e API endpoint, default: https://queue.amazonaws.com
--file, -f Name of a .ini configuration file
--help, -h help
=cut
share/SendMessage.pm view on Meta::CPAN
=head1 USAGE
example.pl [-f config-file] SendMessage message [queue-url]
Note: If you do not set the queue URL in the config, then you must
provide it on the command line.
=head1 OPTIONS
--endpoint-url, -e API endpoint, default: https://queue.amazonaws.com
--file, -f Name of a .ini configuration file
--help, -h help
=cut
share/SetQueueAttributes.pm view on Meta::CPAN
attributes is a list of key, value pairs. Example:
'VisibilityTimeout=60,MessageRetentionPeriod=3600'
Note: If you do not set the queue URL in the config, then you must
provide it on the command line.
=head1 OPTIONS
--endpoint-url, -e API endpoint, default: https://queue.amazonaws.com
--file, -f Name of a .ini configuration file help, -h help
=cut
share/example.pl view on Meta::CPAN
use Getopt::Long qw(:config no_ignore_case);
########################################################################
sub main {
########################################################################
my %options;
my @option_specs = qw(
file|f=s
help|h
endpoint-url|e=s
debug|d
);
my $retval = GetOptions( \%options, @option_specs );
if ( !$retval || ( $options{help} && !@ARGV ) ) {
pod2usage(1);
}
my $example = shift @ARGV;
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.660 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )