---
title: "Kafka consumer group rebalance when a consumer joins"
description: "One consumer owns all four partitions, then a second joins. An eager rebalance revokes every partition, then the Kafka group splits them two and two."
url: https://monedula.dev/kafka-simulator/scenarios/add-consumer-rebalance/
---

# Kafka consumer group rebalance when a consumer joins

Scenario 02.2.2 · Add a consumer: rebalance. Consumer groups · Intermediate · about 3 min · Apache Kafka 4.3.

One member owns every partition; a second consumer joins and a rebalance redistributes the partitions across both.

Run it: https://monedula.dev/kafka-simulator/playground/?scenario=02.2.2

## What you start with

When group membership changes, the coordinator runs a rebalance to redistribute partitions. This scenario starts with one member owning every partition, then a second consumer joins and the classic eager (range) protocol revokes everything before re-assigning the work across both.

## Step by step

1. **One member owns every partition** (t+0.000s): The group g1 starts with a single member, c1. With nobody to share with, the assignor gives c1 all four partitions (p0-p3). A one-member group is just a single consumer reading the whole topic. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=02.2.2&t=0)
2. **c1 consuming all four partitions** (t+1.700s): One record was produced to each partition. c1 polls and drains all four on its own - positions advance to 1 across p0-p3 and lag is 0. This is the throughput ceiling of a single member: it must keep up with every partition by itself. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=02.2.2&t=1)
3. **c2 joins - eager rebalance (stop-the-world)** (t+2.050s): A second consumer joins the group. The classic range assignor uses an EAGER rebalance: every member first REVOKES all of its partitions (the group is marked rebalancing and no one owns anything), so consumption pauses for the rebalance window before the new assignment is computed. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=02.2.2&t=2)
4. **Rebalanced - partitions split 2 + 2** (t+2.600s): The rebalance completes: the assignor redistributes the four partitions across the two members - c1 keeps p0-p1 and c2 takes p2-p3. Read work is now shared, and both members resume polling their own partitions. Adding (or removing) a consumer is exactly how a group scales with its membership. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=02.2.2&t=3)

## The takeaway

Adding a consumer triggers a rebalance that spreads partitions across the new membership; the same mechanism runs in reverse when a member leaves, so a group scales reads up and down with its size.

## Further reading

- [Apache Kafka documentation](https://kafka.apache.org/43/getting-started/introduction/)
