-
Notifications
You must be signed in to change notification settings - Fork 22
Built-in support for message compression #181
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
base: main
Are you sure you want to change the base?
Conversation
Support for gzip, lz4 and snappy
|
I have had as a proud feature of this library that this is a 0 dependency library. Could we make the dependencies optional? |
| * @param properties - properties to be published | ||
| * @param [mandatory] - if the message should be returned if there's no queue to be delivered to | ||
| * @param [immediate] - if the message should be returned if it can't be delivered to a consumer immediately (not supported in RabbitMQ) | ||
| * @param options - publish options including compression settings |
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.
These methods should map closely to the protocol. Add compression to a high level client.
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.
I agree, we should build out BaseClient to have high level features like auto-reconnect, message coding, rpc client/server etc. Just like the ruby client. This is a WIP in that direction: #180
|
Nice! I agree with
IMHO we should build out BaseClient to have high level features like auto-reconnect, message coding, rpc client/server etc. Just like the ruby client. This is a WIP in that direction: #180 |
They are, since they are specified as |
@baelter sounds good, maybe combine this PR into #180 or at least base this branch on your |
Adds support for the producer to compress the payload by specifying compression algorithm, supported algos are gzip, lz4 and snappy. Looked at adding zstd but didn't find any packages with a synchronous API.
The consumer automatically picks up how the payload is compressed and decompresses it.
Each package is optional and it will be lazy loaded if needed.