kafka-go icon indicating copy to clipboard operation
kafka-go copied to clipboard

added-autoderive-batchSize--added-check-after-compression

Open timmyb32r opened this issue 1 year ago • 6 comments

Hi guys.

We are using driver segmentio/kafka-go, and encountered several problems:

  • User should set BatchBytes manually (when driver can just take 'max.message.bytes' from broker)
  • WriteMessages can be used to write into multiple topics, each topic can have own 'max.message.bytes' limit - but BatchBytes is one for writer
  • When messages exceed BatchBytes - it returns an error, but this check occurs before compression. Actually message can be compressed and successfully produced into kafka.

I couldn't solve it by wrapper over driver, and decided to expand a driver.

Here are my idea - to add two boolean options in driver, and turn-on new behaviour only when they set into 'true'. I know there should be tests to be considered for merging - but I don't know, maybe this my approach isn't canonical or something else may be wrong, and maybe I shouldn't waste time on tests, if PR anyway will be rejected.

So, what do you think?

timmyb32r avatar Oct 17 '24 13:10 timmyb32r

Atlantis commands can't be run on fork pull requests. To enable, set --allow-fork-prs or, to disable this message, set --silence-fork-pr-errors

seg-atlantis-prod[bot] avatar Oct 17 '24 13:10 seg-atlantis-prod[bot]

Error parsing command: EOF found when expecting closing quote

seg-atlantis-prod[bot] avatar Oct 17 '24 13:10 seg-atlantis-prod[bot]

Atlantis commands can't be run on fork pull requests. To enable, set --allow-fork-prs or, to disable this message, set --silence-fork-pr-errors

seg-atlantis-prod[bot] avatar Oct 23 '24 16:10 seg-atlantis-prod[bot]

Error parsing command: EOF found when expecting closing quote

seg-atlantis-prod[bot] avatar Oct 23 '24 16:10 seg-atlantis-prod[bot]

Atlantis commands can't be run on fork pull requests. To enable, set --allow-fork-prs or, to disable this message, set --silence-fork-pr-errors

seg-atlantis-prod[bot] avatar Oct 23 '24 16:10 seg-atlantis-prod[bot]

Error parsing command: EOF found when expecting closing quote

seg-atlantis-prod[bot] avatar Oct 23 '24 16:10 seg-atlantis-prod[bot]