-
Notifications
You must be signed in to change notification settings - Fork 194
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
Add concurrent-between-partitions kafka subscriber #2017
Add concurrent-between-partitions kafka subscriber #2017
Conversation
So far this is a work in progress, I will mark it as ready for review when it is ready. |
5b0f54d
to
e7b31dd
Compare
@Lancetnik Ready for review. |
@Arseniy-Popov thank you a lot! But I'll be able to look only next few days, sorry |
…artitions
Previously the user-supplied consumer rebalance listener couldn't identify which consumer it was listening to, so a default listener factory that accepts a
|
…artitions
Description
This adds at-least-once (manual commit) concurrent consumption from Kafka that is concurrent between partitions and sequential within a partition. This improves throughput by enabling concurrency while preserving message ordering guarantees and at-least-once delivery semantics.
Background
Concurrent at-least-once consumption from a single partition is at best not trivial with Kafka because Kafka doesn't support out-of-order commits: a commit shifts the offset forward and effectively commits all previous messages up to that offset that might have not yet been processed. That problem is rectified if consumption is sequential within a single partition while being concurrent between partitions. A partition is a unit of parallelism in Kafka.
Type of change
Checklist
scripts/lint.sh
shows no errors)scripts/test-cov.sh
scripts/static-analysis.sh
Example
Assuming a topic is populated with 8 messages spread across 4 partitions in a round-robin manner, this example
will generate the following output