RangeAssignor is Kafka’s default partition-assignment strategy. During a consumer-group rebalance, the group leader assigns corresponding partition numbers from subscribed topics to the same consumer. All consumers in the group must use the same strategy to avoid unpredictable assignments, inconsistent processing, and performance problems. section 9.4.2
Aligning partitions for a stream join
With products.prices.changelog and products.sales, each having two partitions, and three consumers, Consumer 1 receives Partition 0 from both topics, Consumer 2 receives Partition 1 from both, and Consumer 3 receives nothing. If both topics use the product name as their key, matching products land in matching partitions, making the data easy to join. Use Kafka Streams rather than implementing a naive join directly in a consumer. section 9.4.2
Figure 9.5 By default, partitions in a consumer group are assigned in such a way that the same partition across different topics is always consumed by the same consumer. While this may not be the most resource-efficient allocation, it allows us to easily perform joins across multiple topics.
Compare aligned cross-topic assignments with more evenly distributed alternatives and see why alignment can simplify joins while leaving some consumers idle. section 9.4.2

