Add --kafka.producer.batch-min-messages collector flag#2371
Merged
yurishkuro merged 1 commit intojaegertracing:masterfrom Aug 4, 2020
prymitive:kafka.producer.batch-min-messages
Merged
Add --kafka.producer.batch-min-messages collector flag#2371yurishkuro merged 1 commit intojaegertracing:masterfrom prymitive:kafka.producer.batch-min-messages
yurishkuro merged 1 commit intojaegertracing:masterfrom
prymitive:kafka.producer.batch-min-messages
Conversation
Currently to control batch size when collector writes to kafka user can set --kafka.producer.batch-max-messages flag. This flag is used to configure kafka client library and set upper limit on the number of messages in a single batch, so the meaning of this flag is 'write up to N messages in a single batch'. Current wording on --kafka.producer.batch-max-messages help text is 'Number of message to batch before sending records to Kafka.' which suggests that it's used to set minimal number of messages needed to send a batch to kafka. For a user who wants to enforce a minimal batch size this means that there's currently no way of doing that, but at the same time there's a flag that is described as a way to do it, while actually doing something else. This patch adds a --kafka.producer.batch-min-messages flag that allows configuring minimal batch size in the kafka client library and updates --kafka.producer.batch-max-messages flag description to be more clear on the effect it causes. Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #2371 +/- ##
=======================================
Coverage 95.61% 95.62%
=======================================
Files 206 206
Lines 10542 10548 +6
=======================================
+ Hits 10080 10086 +6
+ Misses 394 393 -1
- Partials 68 69 +1
Continue to review full report at Codecov.
|
yurishkuro
approved these changes
Aug 4, 2020
Member
|
thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which problem is this PR solving?
Currently to control batch size when collector writes to kafka user can set
--kafka.producer.batch-max-messagesflag. This flag is used to configure kafka client library and set upper limit on the number of messages in a single batch, so the meaning of this flag is 'write up to N messages in a single batch'.Current wording on
--kafka.producer.batch-max-messageshelp text is 'Number of message to batch before sending records to Kafka.' which suggests that it's used to set minimal number of messages needed to send a batch to kafka.For a user who wants to enforce a minimal batch size this means that there's currently no way of doing that, but at the same time there's a flag that is described as a way to do it, while actually doing something else.
Short description of the changes
This patch adds a
--kafka.producer.batch-min-messagesflag that allows configuring minimal batch size in the kafka client library and updates--kafka.producer.batch-max-messagesflag description to be more clear on the effect it causes.