-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
feat(inputs.kafka_consumer): Option to set default fetch message bytes #11220
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @AlbertasB, thanks for the PR! I have two small comments. Can you please take a look?
## negotiating sizes and not actually consuming. Similar to the JVM's | ||
## `fetch.message.max.bytes`. | ||
# fetch_message_bytes = 1048576 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please rename to consumer_fetch_default
as this is what you ultimately use it as such.
@@ -43,6 +43,7 @@ type KafkaConsumer struct { | |||
BalanceStrategy string `toml:"balance_strategy"` | |||
Topics []string `toml:"topics"` | |||
TopicTag string `toml:"topic_tag"` | |||
FetchMessageBytes int32 `toml:"fetch_message_bytes"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about making this a config.Size
so you can specify human-readable sizes like 1MB
or 1MiB
?
@AlbertasB did you find some time to address my comments? Other than the renaming and type changes this is good and I would really like to see this being merged! |
Hi @AlbertasB, it looks like a couple of final changes are required, and then we can do a final review. Can you loop back on this? Thanks! |
Hey, thanks for the review and the comments. Somehow I did not get the message :(. I will try to make those changes ASAP. Thanks again :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's looking great, almost ready to merge. It looks like there's an extra file in the PR that needs to be removed: oryxBuildBinary. Maybe a test file that sneaked in?
Ooops no idea how that got there, nice catch! Removed :) |
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
Required for all PRs:
This allows setting number of message bytes to fetch from the broker in each request (default 1MB). Similar to the JVM's
fetch.message.max.bytes
. Might be useful in some cases. I needed it specifically to make telegraf consume messages faster from Kafka cluster.