Kafka Consumer Group Rebalancing
7 min read.
Production Kafka scaling: watch a topic’s partitions get reassigned across a consumer group as consumers join and leave, under the Range and RoundRobin assignors.
Think of it this way: A consumer group is like a team splitting a stack of mailboxes (partitions): every mailbox is checked by exactly one teammate. Add a teammate and the mailboxes are redealt; if there are more teammates than mailboxes, the extras stand idle.
orders, 6 partitions; group order-service- C1P0P1P2
- C2P3P4P5
Parallelism 2/6.
Check your understanding
Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.
Range assignment
Seven partitions, three consumers, Range assignor. Sort each partition to its consumer.
Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.
Consumer 1
Drop items hereConsumer 2
Drop items hereConsumer 3
Drop items hereQuiz
21 questionsWhat caps the maximum consumer parallelism in a group?
Done with this lesson?
Sign in free to keep your progress, streak and quiz scores.