Skip to content

Commit

Permalink
Update the pushRaw() method to enforce the MessageGroupId and Message…
Browse files Browse the repository at this point in the history
…DeduplicationId values sent to AWS are strings.
  • Loading branch information
patrickcarlohickman committed Sep 21, 2024
1 parent e3002f8 commit b837609
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SqsFifoQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ public function setSqs(SqsClient $sqs)
public function pushRaw($payload, $queue = null, array $options = [])
{
$message = [
'QueueUrl' => $this->getQueue($queue), 'MessageBody' => $payload, 'MessageGroupId' => $this->getMeta($payload, 'group', $this->group),
'QueueUrl' => $this->getQueue($queue), 'MessageBody' => $payload, 'MessageGroupId' => strval($this->getMeta($payload, 'group', $this->group)),
];

if (($deduplication = $this->getDeduplicationId($payload, $queue)) !== false) {
$message['MessageDeduplicationId'] = $deduplication;
$message['MessageDeduplicationId'] = strval($deduplication);
}

$response = $this->sqs->sendMessage($message);
Expand Down

0 comments on commit b837609

Please sign in to comment.