简体   繁体   English

AWS SDK for PHP - SQS错误

[英]AWS SDK for PHP - SQS error

using the SDK, I can create a queue and get the queue list - but somehow I can not send message to any of the queues. 使用SDK,我可以创建一个队列并获取队列列表 - 但不知怎的,我无法向任何队列发送消息。 Used the following: 使用以下内容:

$sqs = new AmazonSQS();
$sqs->set_region(AmazonSQS::REGION_SINGAPORE);
$queues =  $sqs->get_queue_list();
$response = $sqs->send_message($queues[0], $message);

But, I am getting the error: 但是,我收到错误:

[Type] => Sender
[Code] => AWS.SimpleQueueService.NonExistentQueue
[Message] => The specified queue does not exist for this wsdl version.

$queues is following: (xxxxx is a number) $ queues如下:(xxxxx是一个数字)

    Array
(
    [0] => https://sqs.ap-southeast-1.amazonaws.com/1001xxxxxxxx/website-email
)

Any ideas? 有任何想法吗?

I have the same problem. 我也有同样的问题。 It seems to be a bug in SDK 1.5! 这似乎是SDK 1.5中的一个错误!

Check this: https://forums.aws.amazon.com/thread.jspa?threadID=82874&tstart=0 请查看: https//forums.aws.amazon.com/thread.jspa?threadID = 82874&tstart = 0

Quote from there: 从那里引用:

Users are experiencing problems when performing queue operations like send_message and receive_message where an HTTP 400 error is received with the error code AWS.SimpleQueueService.NonExistentQueue. 用户在执行诸如send_message和receive_message之类的队列操作时遇到问题,其中收到HTTP 400错误,错误代码为AWS.SimpleQueueService.NonExistentQueue。 This is being caused by a regression introduced in version 1.5 of the SDK in which the request URL for queue operations is not being constructed properly. 这是由SDK 1.5版中引入的回归引起的,其中队列操作的请求URL未正确构造。

HTH HTH

据我所知, send_message()的第一个参数是队列名,而不是URI。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM