Skip to content

Assign Parallel Consumer to a specific partition assignment. #722

Closed Answered by rkolesnev
Jayesh-pict asked this question in Q&A
Discussion options

You must be logged in to vote

Kafka Consumer protocol endeavours to distribute load between consumers. Each parallel consumer instance - wraps Kafka Consumer and presents as such to cluster.
So if you have 10 partitions and 2 Parallel Consumer instances - load will be split by 5 partitions assigned to each Parallel Consumer instance.
If you launch 1 more Parallel Consumer instance - rebalance will happen and load will be split as 4,3,3 partitions per instance.
And so on up to 10 Parallel Consumer instances when each will have 1 partition assigned.

Same happens when instances are stopped - if you go from 10 Parallel Consumer instances to 5 - each will have 2 partitions assigned.
The Kafka Consumer just has to be config…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rkolesnev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants