-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQS messages without attributes cannot be received #2827
Comments
An example message as received from aws cli is:
|
Hi @nicosp, Sorry to hear about the issues. This is likely due to the SQS migration from query to json protocol— it's possible that this is exposing bad config, but very hard to tell without a code example and debug logs. Could you please provide a reproducible example and provide debug logs by adding |
I think I have pinpointed the issue. We are using elasticmq for local development and when the original message does not have any MessageAttributes it sends an empty MessageAttributes array and no MD5OfMessageAttributes. This causes Sqs::calculateMessageAttributesMd5 to expect the checksum for the empty string and fails because there is no checksum in the message.
|
|
Hi @nicosp, Dug a bit further into this and wasn't able to reproduce this using SQS. My guess is that ElasticMq is opting to send an empty array for |
@stobrien89 Thank you for the fix. Just a heads up that elasticmq also fixed this on their side with version 1.5.2 |
Describe the bug
Message fails with: "No Attribute MD5 found. Expected ". This issue is present between 3.285.1 and at least until 3.286.2.
I downgraded to 3.285.0 and the issue was gone.
Expected Behavior
Receive the message without an exception.
Current Behavior
For some reason the MessageAttributes are set and not null but they are not an array. Note that the actual message does not have any attributes or the "MessageAttributes" property.
Reproduction Steps
Send a message without any message attributes. Try to receiveMessage.
Possible Solution
No response
Additional Information/Context
No response
SDK version used
3.285.1-3.286.2
Environment details (Version of PHP (
php -v
)? OS name and version, etc.)PHP 8.2.12 (cli) (built: Oct 26 2023 17:23:09) (NTS) on Debian/sid
The text was updated successfully, but these errors were encountered: