-
Notifications
You must be signed in to change notification settings - Fork 81
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
How to Zstandard compress and microbatch events with output binding? #207
Comments
Hi @smitty-codes |
@TsuyoshiUshio These are the 2 important settings to optimize for throughput (see the Confluent PDF document > page 27 I posted above). There are other settings you may consider to optimize for other scenarios like latency, durability and availability in that document. |
Hi @smitty-codes |
@TsuyoshiUshio What is the status on this item? I read thru the PR and it looks like it was decided this would be an attribute we can set on the function which is fine. I upgraded to 3.3.2 but didn't see this is available yet and not seeing it listed in 3.3.3 pre-release. This is a pretty important item for us - it will really cut down on Confluent Cloud costs based on the volume of data we're anticipating to push thru kafka/CC. |
The ownership of this repo has been changed. @lpapudippu Could you have a look? Current status, I create a pr, however, before my pr, a contributor already sent a pull request and in the review status. #175 |
@shrohilla Can you please take a look at it ? cc: @raorugan |
Any update on this issue? |
Setup
Goal
After my AF code has processed events and created a new list of ISpecific AVRO POCOs, I want to forward those new events to another Kafka topic but I want to send these new events as Zstd compressed microbatch.
Problem
I didn't see an argument I could pass into the KafkaAttribute output binding that lets me define a compression (in Confluent .NET client the setting is ProducerConfig.CompressionType = CompressionType.Zstd [compression.codec]) nor could I find the setting to linger to "fill up" the internal librdkafka buffer (ProducerConfig.LingerMs [linger.ms]).
See #57 and in #11 it seems the idea of providing all config options was shot down because it was messy - maybe we could just get the CompressionType setting added into KafkaProducerFactory.cs > GetProducerConfig()?
Regarding the microbatching, is that kind've what you get with using an "out" param for the output binding?
[Kafka("LocalBroker", "stringTopic")] out KafkaEventData<string>[] kafkaEventData
as opposed to using the IAsyncCollector and calling .AddAsync()?
In the meantime, I assume I need to manually use Confluent's AvroSerializer() and take that byte[] and run it thru a ZStandard library (like ZstdNet) to compress it?
I also attached a Confluent Best Practices PDF which on page 25 outlines which settings to tweak to optimize for different scenarios (optimize for latency, throughput, durability and availability). You may consider exposing these settings.
confluent cloud-Best_Practices_for_Developing_Apache_Kafka_Applications_on_Confluent_Cloud.pdf
Thanks
The text was updated successfully, but these errors were encountered: