Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #36525 Improve SQS interoperability (jderusse)
This PR was squashed before being merged into the 5.1-dev branch (closes #36525). Discussion ---------- Improve SQS interoperability | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | NA | License | MIT | Doc PR | NA The Symfony Messenger component provides a SerializerInterface to encode/decode the `Envelope`, this can be used to improve the Interoperability (see [article from jolicode](https://jolicode.com/blog/symfony-messenger-et-linteroperabilite) (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 message `Body`. That partially defect the interoperability: 3rd party have to also wrap (unwrap) message form json_encoded Body. This PR leverage the AWS SQS `Body` and `MessageAttribute` properties to store message information: ```yaml # before SQS Message: Body: {"body": "hello world", "headers": {"foo": "bar"}} MessageAttributes: {} # after SQS Message: Body: hello world MessageAttributes: foor: bar ``` Commits ------- 00d84c1 Improve SQS interoperability
- Loading branch information
Showing
3 changed files
with
26 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters