Subject: | Receiving multiple messages |
Amazon::SQS::Simple 1.01
Perl: v5.8.7 built for x86_64-linux-gnu-thread-multi
I am having an issue retrieving multiple messages in one request. The
first issue is that the documentation says to pass in NumberOfMessages
but actually one needs to pass in the param MaxNumberOfMessages. I
know, a small detail, but it took me a little while to figure it out.
Once I made that change, I received the following error:
Pseudo-hashes are deprecated at
/usr/share/perl5/Amazon/SQS/Simple/Message.pm line 12.
No such pseudo-hash field "Version" at
/usr/share/perl5/Amazon/SQS/Simple/Message.pm line 12.
Code:
my $access_key = '********'; # Your AWS Access Key ID
my $secret_key = '********'; # Your AWS Secret Key
my $sqs = new Amazon::SQS::Simple($access_key, $secret_key);
my $q = $sqs->CreateQueue('QUEUENAME');
my $msg = $q->ReceiveMessage(MaxNumberOfMessages => 2);