-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] [AMQP] Support “content encoding” property #47545
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
Conversation
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
@@ -18,6 +18,7 @@ | |||
"require": { | |||
"php": ">=8.1", | |||
"ext-amqp": "*", | |||
"ext-zlib": "*", |
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.
As this is optional, it should be moved to require-dev
instead.
src/Symfony/Component/Messenger/Bridge/Amqp/Transport/AmqpReceiver.php
Outdated
Show resolved
Hide resolved
|
||
class Gzip implements CompressorInterface | ||
{ | ||
|
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.
extra blank line
src/Symfony/Component/Messenger/Bridge/Amqp/Compressor/CompressorFactory.php
Outdated
Show resolved
Hide resolved
You should also rebase to get rid of the merge commit. |
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.