-
Notifications
You must be signed in to change notification settings - Fork 1.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
in_kafka: Add async commit mode #8894
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: HaChanHo <cksgh3770@naver.com>
a42ff0f
to
047120c
Compare
@HaChanho thanks for this contribution. just a side question, what if rd_kafka_commit() is called after the iteration happens, once the while has finished ?, now it runs right after every message which has been consumed: fluent-bit/plugins/in_kafka/in_kafka.c Line 184 in ea7b9f4
|
If we process the commit after the loop ends, it will certainly improve performance compared to committing right after consuming each message. However, there is a possibility of duplicate message processing if the consumer restarts before the offset is updated due to commit delay. I believe that consumer restart is rare under normal circumstances, and handling duplicate messages may not be a significant issue compared to message loss. It might be better to handle duplicate messages in the final processing system (output). Do you have any plans to improve the code related to this? |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
We've added async_commit mode to Fluent Bit's in_kafka plugin, which allows you to handle Kafka commit operations asynchronously. Depending on your choice, this is expected to improve performance and efficient resource usage.
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
async_commit
mode OFFasync_commit
mode ONIf this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
in_kafka: Add async_commit description fluent-bit-docs#1385
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.