liveBook · Manning

RoundRobinAssignor

As explained in Apache Kafka in Action

The Round Robin Assignor is a Kafka partition-assignment algorithm that distributes partitions from subscribed topics evenly among consumers.

Round Robin Assignor distributes the partitions of all subscribed topics evenly among consumers in a consumer group. It suits simple multi-topic consumption when consumers do not need matching partitions across topics for joins. section 9.4.2 section 9.5

Choosing even distribution over partition alignment

Suppose a consumer group reads several topics but does not correlate their records. Range assignment preserves the same partition-to-consumer mapping across topics, while Round Robin spreads every topic's partitions across the group. For joins, use Kafka Streams rather than relying on a naive consumer implementation. section 9.4.2

Figure 9.6 The Round Robin Assignor (and the more advanced Sticky and Cooperative Sticky Assignors described later) distributes the load evenly across the consumers of our consumer group.
A screenshot of a computer screen

AI-generated content may be incorrect.

The partition-allocation diagram shows how Round Robin distributes the load evenly across consumer-group members. section 9.4.2

A rebalance can assign entirely different partitions after membership, partition, or failure changes. Consumers must stop consuming, clear internal state such as caches, and commit offsets before the rebalance. Sticky Assignor reduces movement, while Cooperative Sticky Assignor avoids stopping unaffected partitions. section 9.4.2 section 9.5

How Apache Kafka in Action covers it

How deep it goes
Explains the allocation goal and rebalance consequences, then contrasts movement and disruption with Sticky and Cooperative Sticky Assignors.
Examples
Uses multi-topic consumers, evenly distributed partitions, and a contrast with partition alignment required for joins.
What it assumes
Assumes consumer groups, topics, partitions, offsets, and rebalances; distinguishes assignment strategies within that model.
What you can do after
Apply it to distribute multi-topic consumer workloads evenly when cross-topic joins are unnecessary.
How it connects
Connects consumer groups, Range Assignor, Sticky Assignor, Cooperative Sticky Assignor, rebalancing, offsets, and Kafka Streams.

Related concepts

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