diff --git a/src/MessageQueue/MessageQueue.php b/src/MessageQueue/MessageQueue.php index 82f5dd4..8969edd 100644 --- a/src/MessageQueue/MessageQueue.php +++ b/src/MessageQueue/MessageQueue.php @@ -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 ];