Eager rebalancing is Kafka’s stop-the-world consumer-group protocol. When membership changes, every consumer gives up all assigned topic partitions, so processing pauses before new assignments are distributed. section 4.3.2
The protocol proceeds through these coordination steps:
- The group coordinator detects membership change and triggers a rebalance. section 4.3.2
- All members relinquish their partitions and send JoinGroup requests describing the partitions they want. section 4.3.2
- The group leader creates assignments for every member and sends them to the coordinator in a SyncGroup request. section 4.3.2
- Members receive assignments in SyncGroup responses and resume processing. section 4.3.2
A consumer joins
When a new consumer joins a group, existing consumers stop processing and surrender their partitions. After the leader recalculates assignments, most partitions may return to their original consumers, but all processing has paid the rebalance pause. section 4.3.2
Figure 4.13 Rebalancing with the eager or “stop-the-world” approach. Processing occurs on all partition stops until reassigned, but most of the partitions end up with the original consumer.
Use the figure to visualize the full processing pause and the partitions that ultimately remain with their original consumers. section 4.3.2
