-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Improve SQS interoperability #36525
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
Improve SQS interoperability #36525
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are broken :)
tests are broken because the FakeSqs service does not support MessageAttributes.... iain/fake_sqs#59 I'm looking for an alternative testing image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining failures are unrelated
Thank you @jderusse. |
@jderusse @chalasr is it possible this introduced the following issue:
When trying to send a message that is serialized (using the Symfony serializer) to:
Trying to get a proper description going before opening an issue. |
This PR was squashed before being merged into the 5.1 branch. Discussion ---------- Fix invalid char in SQS Headers | Q | A | ------------- | --- | Branch? | 5.1 | Bug fix? | yes | New feature? | no | Deprecations? | yes | Tickets | #36525 (comment) | License | MIT | Doc PR | / From [Amazon documnetation](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html) header's name have constraints: - only `a-zA-Z0-9_\.-` + not start/end with a `.` - 256 char This PR serialize ALL headers in a single SQS Attribute. Commits ------- 76a18b0 Fix invalid char in SQS Headers
The Symfony Messenger component provides a SerializerInterface to encode/decode the
Envelope
, this can be used to improve the Interoperability (see article from jolicode (french))Sadly, the current implementation of SQS adapter json_encode the elements of the
Envelope
(string body
+string[] headers
) and store everything in the SQS messageBody
. That partially defect the interoperability: 3rd party have to also wrap (unwrap) message form json_encoded Body.This PR leverage the AWS SQS
Body
andMessageAttribute
properties to store message information: