Figure 4-3 Chapter 4
Four consumers, one partition each
Two consumers share topic T1 until Consumers 3 and 4 join. The group rebalances, partition 2 moves to Consumer 3 and partition 3 to Consumer 4, and each of the four consumers ends up reading a single partition.
What to notice
See that once a group has as many consumers as the topic has partitions, each consumer reads exactly one, the furthest the group can spread the work.
From Chapter 4: Kafka Consumers: Reading Data from Kafka in Kafka: The Definitive Guide.
Open SVG
Space pauses, R restarts, arrows move between animations