[Messenger] [Amqp-messenger] Support content encoding and compression #47592
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When I send a message using the AMQP transport together with the AmqpStamp and the content-encoding property, the message is not compressed.
The AMQP protocol, allow through the content-encoding property, to “indicate what additional content encodings have been applied to the application-data, and thus what decoding mechanisms need to be applied in order to obtain the media-type referenced by the content-type header field”.
The values admitted according to the protocol are: gzip, compress, deflate, identity, etc.
I expect that the body of the message will be compressed and decompressed respectively by the publisher
and the subscriber.
For example, we can send a messages:
and, With the current code the body message (payload) is not compress using gzip:
but, if we are aware of the value of the content_encoding property we should compress the body message.
Finally, the subscriber must be able to uncompressed the body message. I made some changes in order to figure out how
this can be accomplished.
Thanks!, I should be grateful for any comments.
Postscriptum: I closed the PR 47545 by mistake :).