Amazon-SQS-Simple

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

		Added SendMessageBatch, ReceiveMessageBatch (Chris Jones)
		
2.01	1 Jul 2013
		Fix bug with SendMessageBatch and single messages :D
		
2.02	1 Jul 2013
		As above with updated Changes file :D
		
2.04	1 Sep 2013
		Retry 500 errors (on advice from AWS support)
		Handle ARN-style endpoints (https://sqs.<host>.amazonaws.com/<nnn>/<queue>)

2.05    16 Jan 2017
        Add v4 signature support (rustyconover)
        Better tracking of retries (cjhamil)
        Retry 503s as well (Chris Jones)
        
2.06    20 Mar 2017
        Fix 500/503 retry code so it actually works

2.07    18 Sep 2018

lib/Amazon/SQS/Simple.pm  view on Meta::CPAN


use Carp qw( croak );
use Amazon::SQS::Simple::Base; # for constants
use Amazon::SQS::Simple::Queue;
use base qw(Exporter Amazon::SQS::Simple::Base);

our $VERSION   = '2.07';
our @EXPORT_OK = qw( timestamp );

sub GetQueue {
    my ($self, $queue_endpoint) = @_;

	if ($queue_endpoint =~ /^arn:aws:sqs/) {
		my ($host, $user, $queue);
		(undef, undef, undef, $host, $user, $queue) = split(/:/, $queue_endpoint);
		$queue_endpoint = "https://sqs.$host.amazonaws.com/$user/$queue";
	}

    return Amazon::SQS::Simple::Queue->new(
        $self->{AWSAccessKeyId},	#AWSAccessKeyId and SecretKey are the first two arguments to Amazon::SQS::Simple::Base->new
        $self->{SecretKey},
        %$self,
        Endpoint => $queue_endpoint,
    );
}

sub CreateQueue {
    my ($self, $queue_name, %params) = @_;
    
    $params{Action}    = 'CreateQueue';
    $params{QueueName} = $queue_name;
        
    my $href = $self->_dispatch(\%params);

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.035 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )