liveBook · Manning

Barrier

As explained in Kafka Streams in Action, Second Edition

A synchronization barrier is a coordination point at which consumers wait for assignment synchronization before processing can resume.

A synchronization barrier is the pause between a consumer group's JoinGroup request and its SyncGroup response. Consumers resume processing only after receiving topic-partition assignments, ensuring that each partition has one owner. section 4.3.2

The barrier coordinates rebalancing through these roles:

  • The group leader creates assignments and sends them to the group coordinator. section 4.3.2
  • All group members send SyncGroup requests and receive their assignments from the coordinator. section 4.3.2
  • Eager rebalancing pauses every consumer during reassignment, while incremental cooperative rebalancing keeps unchanged partitions processing. 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.
figure

Visualizes the eager or stop-the-world barrier, where all partition processing stops until reassignment completes. section 4.3.2

Figure 4.14 Rebalancing with cooperative approach processing continues and only stops for partitions marked for reassignment.
figure

Contrasts cooperative rebalancing, where processing continues for partitions that do not require reassignment. section 4.3.2

How Kafka Streams in Action, Second Edition covers it

How deep it goes
Traces JoinGroup and SyncGroup behavior, coordinator roles, ownership guarantees, and eager-versus-cooperative downtime.
Examples
Uses assignment diagrams and contrasting eager and cooperative rebalance figures to show when partition processing stops.
What it assumes
Assumes consumer-group and topic-partition terminology while explaining coordinator and leader responsibilities.
What you can do after
Evaluate rebalancing downtime and explain why processing waits for synchronized partition assignments.
How it connects
Connects consumer groups, topic partitions, group coordinators, group leaders, eager rebalancing, and incremental cooperative rebalancing.

Also explained in

Compare how 3 books explain barrier →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kafka Streams in Action, Second Edition. The section links point to the parts of the book it draws on.