Attributes not visible when sending message to Amazon SQS using PHP SDK

Viewed 83

I am trying to send a message to an SQS queue, in PHP with a message body and message attributes. This is how my message looks:

$message = [
                'MessageAttributes' => [
                    "Title" => [
                        'DataType' => "String",
                        'StringValue' => "The Hitchhiker's Guide to the Galaxy"
                    ],
                    "Author" => [
                        'DataType' => "String",
                        'StringValue' => "Douglas Adams."
                    ],
                    "WeeksOn" => [
                        'DataType' => "Number",
                        'StringValue' => "6"
                    ]
                ],
                'QueueUrl' => $this->queueUrl,
                'MessageBody' => 'Hello SQS testing'
            ];

I found this example on Github: Sending and Receiving Messages in Amazon SQS.

When I open the console and look for my message in the queue, I can see the message body but I don't see any attributes. I am using Amazon SDK for PHP 3.x.

0 Answers
Related