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

Expose Method to Pass Compression Options to Clients #17

Merged

Conversation

matthewberends
Copy link
Contributor

Changes

  • Expose the compress/2 method to allow passing compress options to the compression
  • Move the lz4b_frame headers to the include directory so clients can make use of the records to pass to compress/decompress functions.

Details

The only compression method exposed to the client is compress/1 which defaults to passing 0 as the compress_options. Being able to pass in compression options would allow for more flexibility when using producer compression.

In particular, the use case I have is to disable dependant block compression by setting blockMode = 1 instead of 0. This is because we are seeing the following errors in our kafka brokers when attempting to use lz4 for compression:

org.apache.kafka.common.KafkaException: java.lang.RuntimeException: Dependent block stream is unsupported

@matthewberends matthewberends changed the title Expose compression headers and compress/2 allowing uses to pass options Expose Method to Pass Compression Options to Clients Jul 2, 2024
@matthewberends matthewberends marked this pull request as ready for review July 2, 2024 22:04
@qzhuyan qzhuyan merged commit 7278505 into kafka4beam:master Jul 4, 2024
0 of 7 checks passed
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 this pull request may close these issues.

2 participants