Skip to content

Commit

Permalink
Merge pull request #56 from Enoptea/fix/handle-message-new-format
Browse files Browse the repository at this point in the history
Handle message new format in previous release for php 7.0.
  • Loading branch information
bakura10 authored Nov 6, 2017
2 parents 730086d + 8b5df79 commit 79cde0a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/MessageQueue/MessageQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ private function doFlush(bool $async)
foreach ($messagesToPush as $key => $message) {
$messageParameters = [
'Id' => $key, // Identifier of the message in the batch
'MessageAttributes' => [
'Name' => [
'DataType' => 'String',
'StringValue' => $message['body']['name'],
],
],
'MessageBody' => json_encode($message['body'], self::DEFAULT_JSON_FLAGS),
'DelaySeconds' => $message['options']['delay_seconds'] ?? null
];
Expand Down

0 comments on commit 79cde0a

Please sign in to comment.