简体   繁体   中英

Amazon Sqs FIFO queue

I can't send message to a FIFO queue using the PHP SDK v2.7.16.

I get an exception: "The request must contain the parameter MessageGroupId," even though I am passing a valid MessageGroupId argument.

 public function sendMessage($queueUrl,$messageBody)
 {
   $this->client->sendMessage(array(
   'QueueUrl'    => $queueUrl,
   'MessageBody' => $messageBody,
   'MessageGroupId'=>'messagegroupid1000',
   'MessageDeduplicationID'=>'messagededuplicationid1000'));
 }

Whats wrong?

Support for SQS FIFO queues was apparently introduced in version 3.19.28 (2016-11-17) of the AWS SDK for PHP.

See https://github.com/aws/aws-sdk-php/blob/master/CHANGELOG.md

See also https://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/migration.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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