ZF-10610: Zend_Service_Amazon_Sqs is not using the region to create queues
Description
Create queue is not using the region to correctly create the queue on the specified Amazon Endpoint. Amazon has four endpoints that can be used based on your location http://docs.amazonwebservices.com/AWSSimpleQueueSe… Create is not using the region parameter to create queues on the correct endpoint.
In Zend_Service_Amazon_Sqs the _makeRequest method should take into account the region that was specified in the constructor.
$client->setUri('http://'.$this->_sqsEndpoint);
Comments
Posted by Jesper Forsberg (uppe) on 2011-08-30T21:26:24.000+0000
I worked around this by extending the class with this method and putting it to use in the constructor.
protected function _setEndpoint($endpoint) { $this->_sqsEndpoint = $endpoint; }
public function __construct($accessKey = null, $secretKey = null, $region = null) { parent::__construct($accessKey, $secretKey, $region); $endpoint = "sqs.$region.amazonaws.com"; $this->_setEndpoint($endpoint); }
Posted by Jesper Forsberg (uppe) on 2011-08-30T21:28:33.000+0000
Sorry for that terrible formatting. Let me try that again.
Posted by Christoph Kempen (webpatser) on 2011-09-25T08:37:05.000+0000
Added the code to override the default region.
Posted by Christoph Kempen (webpatser) on 2011-09-25T10:26:35.000+0000
Added a list of possible endpoints (as of 2011-09-25) and a method to add new regions if they appear..
Posted by Enrico Zimuel (zimuel) on 2011-09-26T16:23:56.000+0000
Fixed in trunk (commit #24469).
Posted by Enrico Zimuel (zimuel) on 2011-09-26T16:27:59.000+0000
Fixed in branches/release-1.11 (commit #24470)