Skip Menu |
 

This queue is for tickets about the Amazon-SQS-Simple CPAN distribution.

Report information
The Basics
Id: 69416
Status: open
Priority: 0/
Queue: Amazon-SQS-Simple

People
Owner: Nobody in particular
Requestors: JEB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Suppoer which Endpoint to connect to for BASE_ENDPOINT
Download (untitled) / with headers
text/plain 889b
Hi The default BASE_ENDPOINT in this module is: use constant BASE_ENDPOINT => 'http://queue.amazonaws.com'; However http://docs.amazonwebservices.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/ shows that the BASE_ENDPOINT could be: queue.amazonaws.com—The endpoint for US-East us-west-1.queue.amazonaws.com—The endpoint for US-West eu-west-1.queue.amazonaws.com —The endpoint for EU ap-southeast-1.queue.amazonaws.com —The endpoint for Asia Pacific It may be useful to have base_endpoint as an argument to the contstructor along with aws_key and aws_secret in order to easily support the multiple separate queue domains. In the mean time, after the SQS conncetion is established, it appears that the Endpoint attribute can be force overridden: my $sqs = Amazon::SQS::Simple->new($key, $secret); $sqs->{Endpoint} = "http://eu-west-1.queue.amazonaws.com"; JEB
Subject: [patch] Support which Endpoint to connect to
Download (untitled) / with headers
text/plain 733b
--- Amazon-SQS-Simple-1.06.orig/lib/Amazon/SQS/Simple/Base.pm 2010-03-31 10:33:33.000000000 +0100 Here's a possible patch - it requires a URL as the base endpoint (http://domain), and defaults as-is: +++ Amazon-SQS-Simple-1.06/lib/Amazon/SQS/Simple/Base.pm 2011-12-16 03:48:32.000000000 +0000 @@ -24,11 +24,12 @@ my $class = shift; my $access_key = shift; my $secret_key = shift; + my $endpoint = shift; my $self = { AWSAccessKeyId => $access_key, SecretKey => $secret_key, - Endpoint => +BASE_ENDPOINT, + Endpoint => $endpoint || +BASE_ENDPOINT, SignatureVersion => 1, Version => $DEFAULT_SQS_VERSION, @_,
From: slobodan [...] miskovic.ca
Download (untitled) / with headers
text/plain 215b
For anyone else looking, even without the patch you can pass the Endpoint in constructor, just need to tag it: my $sqs = Amazon::SQS::Simple->new($key, $secret, Endpoint => 'http://eu-west-1.queue.amazonaws.com');


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.