Skip to content
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

Add control over compression level #239

Closed
zamazan4ik opened this issue Nov 9, 2022 · 7 comments · Fixed by #240
Closed

Add control over compression level #239

zamazan4ik opened this issue Nov 9, 2022 · 7 comments · Fixed by #240

Comments

@zamazan4ik
Copy link

Hi!

Now the library allows enabling compression before sending to Pulsar but does not allow to choose compression level - the defaults are used. Could you please add the possibility to control compression level for the compression algorithms? It will allow to configure more precisely tradeoff between CPU and size of the messages.

Thanks in advance!

@zamazan4ik
Copy link
Author

@tisonkun @CleverAkanoa What do you think about the idea?

@tisonkun
Copy link
Contributor

@zamazan4ik It seems that the compression level is a zstd specific config. Do you propose to add a Producer config CompressionLevel as Pulsar Go client does so that when zstd is used, we can configure the compression level also?

@tisonkun
Copy link
Contributor

@zamazan4ik If so, you can review #240 and if you agree with the implementation, I can schedule a 4.3.0 release to include this feature.

@zamazan4ik
Copy link
Author

@tisonkun Why we are not able to add compression-level support for other algorithms?

As far as I see, only Snappy does not support compression levels.

So I suggest enabling compression-level parameters for all other compression algorithms.

@tisonkun
Copy link
Contributor

OK. These configs seem heterogeneous and I need a few time to find a proper data model.

If you have good idea, feel free to comment on the PR #240 or send your patch.

@tisonkun
Copy link
Contributor

@zamazan4ik released as https://crates.io/crates/pulsar 5.0.0.

You may take a look at #224 to help triage tasks for a compatible release against Pulsar 2.10.x (whether the tasks are valid, how to reproduce, what's their priority, etc.)

@zamazan4ik
Copy link
Author

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants