The Kafka Streams rebalance protocol (KIP-1071)

Kafka Streams rebalance protocol (KIP-1071): how streams groups assign tasks, what Kafka 4.4 supports, the settings that move to the broker, and migration.

By Stéphane Derosiaux · December 1, 2026

Know what changes when Kafka Streams hands its rebalances to the broker.

Kafka Streams has always rebalanced through the classic consumer group protocol, with one of your own instances computing the task assignment for the whole application. KIP-1071 moves that job to the broker. The application joins a new kind of group, a streams group, and the group coordinator decides which instance runs which task. It went GA in Kafka 4.2 as an opt-in, and Kafka 4.4 closed some of its gaps.

Switching takes one client setting. What changes around it is the part to read first: standby replicas, timeouts and the tools you use to watch the app all behave differently.

What you'll learn:

  • Why Kafka Streams needed its own protocol instead of KIP-848
  • How a streams group assigns tasks
  • What works in Kafka 4.4, and what's still missing
  • The settings that move from your app to the broker, and the standbys you lose if you miss them
  • How to inspect a streams group and migrate an existing app

Why Streams needed its own protocol

In a classic group a Kafka Streams client elected as leader computes the task assignment; in a streams group the group coordinator on the broker computes it

In the classic protocol the broker only tracks who is in the group. When membership changes, every member rejoins, one is elected leader, and the leader runs the assignor. For Kafka Streams that assignor carries a lot: it maps partitions to tasks, places active tasks and standbys, schedules warm-up replicas and probing rebalances, and spreads standbys across racks. All of it runs inside one of your instances, behind a synchronization barrier every member waits on. That machinery is why Streams rebalances are slow and hard to reason about.

KIP-848, GA in Kafka 4.0, moved assignment to the broker for plain consumers. But it assigns partitions to members, and Kafka Streams thinks in tasks with roles: an active task, its standbys, a warm-up being restored. So the Streams main consumer stayed on the classic protocol, and KIP-1071 added a group type that understands tasks.

How a streams group assigns tasks

Each instance heartbeats to the group coordinator and describes its topology: the sub-topologies and the topics they read. From the topology and the members, the coordinator computes a target assignment, the tasks each member should run as active or standby. Members then move toward it one step at a time. A task leaves its current owner before another member gets it, and the tasks that don't move keep processing. There is no leader, no group-wide rejoin, and no assignor running in your JVM.

The coordinator tracks progress with epochs, which you'll see in the tooling. The target assignment epoch moves each time the target changes; each member's member epoch catches up once that member has converged.

What works in Kafka 4.4

CapabilityStatus in Kafka 4.4
Active and standby tasksSupported since 4.2
Built-in assignorSticky only
Static membership (group.instance.id)Since 4.4, with clients and brokers on 4.4 or later
Custom assignorsSince 4.4, on the broker, registered with group.streams.assignors
Rack-aware standby placementTags configured on the broker since 4.4; the sticky assignor ignores them
Warm-up tasksNot yet
Migration from the classic protocolOffline only
Topology changesA significant change (new source topics, a different number of sub-topologies) needs a new group
Regex source topicsNot supported
The missing warm-up tasks matter most for stateful apps. Under the classic protocol, a task moving to a new instance is restored there first, in the background, while the old owner keeps processing (warm-up replicas). Without them, a moved task restores on its new instance before it processes again, which on a large store is the long pause you were trying to avoid. Kafka committer Matthias J. Sax's 2026 talk Keeping the Balance with Kafka Streams puts warm-ups in Kafka 4.5, injected by the coordinator so they work with any assignor.

Static membership has one catch: a topology with no persistent state store gets a new process ID on every restart, so the broker recomputes the assignment anyway.

Turning it on

On the client, one setting:

group.protocol=streams

On the broker, Kafka 4.2 and later enable the protocol on new clusters: a fresh 4.4.0 broker had the streams.version feature finalized at 1 and accepted streams groups with no extra config. A cluster upgraded from an older version needs the feature turned on once:

kafka-features.sh --bootstrap-server localhost:9092 upgrade --feature streams.version=1

The settings that move to the broker

In a streams group, the number of standby replicas, the session timeout and the heartbeat interval are group configs held by the broker (streams.num.standby.replicas, streams.session.timeout.ms, streams.heartbeat.interval.ms). The values in your application config are ignored, without a warning.

We checked it on a Kafka 4.4.0 broker. Two instances configured with num.standby.replicas=1 got no standby task at all, because the broker default, group.streams.num.standby.replicas, is 0. The standbys appeared once the group config was set:

kafka-configs.sh --bootstrap-server localhost:9092 --alter \
  --entity-type groups --entity-name orders-app \
  --add-config streams.num.standby.replicas=1

An app that counts on standbys for fast failover loses them the day it switches protocols, and nothing in its logs says so. Make the group configs part of the migration, check them with kafka-configs.sh --describe --entity-type groups --entity-name orders-app, or raise the broker-wide default.

Inspecting a streams group

kafka-consumer-groups.sh no longer sees the application:

$ kafka-consumer-groups.sh --bootstrap-server localhost:9092 \
    --describe --group orders-app
Error: Executing consumer group command failed due to
org.apache.kafka.common.errors.GroupIdNotFoundException:
Group orders-app is not a consumer group.

Anything that describes the group through the consumer group API gets the same error, so check your lag dashboards and alerts before you switch. The replacement is kafka-streams-groups.sh. --state gives the assignor and the group state, --members the tasks each instance runs, --offsets the lag per input partition, and --verbose adds the target assignment and the epochs:

$ kafka-streams-groups.sh --bootstrap-server localhost:9092 \
    --describe --group orders-app --state
GROUP        COORDINATOR (ID)     ASSIGNOR   STATE    #MEMBERS
orders-app   localhost:9092 (1)   sticky     Stable   2

$ kafka-streams-groups.sh --bootstrap-server localhost:9092 \
    --describe --group orders-app --members
GROUP      MEMBER PROCESS CLIENT-ID   ASSIGNMENTS
orders-app zGwv…  d663…   orders-app… ACTIVE: 0:[0,2]; 1:[0,2]; STANDBY: 0:[1,3]; 1:[1,3];
orders-app Acz6…  2a7a…   orders-app… ACTIVE: 0:[1,3]; 1:[1,3]; STANDBY: 0:[0,2]; 1:[0,2];

Read 0:[0,2] as sub-topology 0, partitions 0 and 2: tasks 0_0 and 0_2, the same task IDs you see in metrics and logs.

Migrating an existing application

Migration is offline only, as of Kafka 4.4:

  1. Stop every instance.
  2. Wait for the session timeout so the group is empty, or force the members out.
  3. Set group.protocol=streams, and set the group configs for standbys and timeouts.
  4. Start the instances again.

Only the committed offsets carry over; the rest of the group is created fresh. The changelog and repartition topics stay as they are. Going back to the classic protocol is the same procedure with group.protocol=classic. Avoid 4.2.0 brokers for this: a bug in the offline migration path (KAFKA-20254) broke existing groups and was fixed in 4.2.1.

Should you switch now?

For a new application on 4.4 brokers, yes, if it doesn't depend on warm-ups: you get broker-side assignment with no leader and no group-wide rejoin, and nothing to migrate later. For an existing stateful application with large stores, wait for warm-up tasks; until then, scaling out moves tasks cold. Applications with regex source topics, or whose topology changes often, can't use it yet.

Either way the classic protocol remains the default, so nothing changes until you opt in.

What is a streams group in Kafka?

A streams group is the group type KIP-1071 added for Kafka Streams applications. The group coordinator on the broker computes which instance runs which task, active or standby, instead of a client elected as leader. An application joins one by setting group.protocol=streams.

Which Kafka version supports the Kafka Streams rebalance protocol?

It went GA in Kafka 4.2 as an opt-in, with active and standby tasks, the sticky assignor and offline migration. Kafka 4.4 added static membership and broker-side custom assignors. Warm-up tasks are not supported yet, and migration from the classic protocol is offline only.

Why are my standby replicas missing after switching to group.protocol=streams?

In a streams group the number of standbys is a group config on the broker, streams.num.standby.replicas, and the client's num.standby.replicas is ignored without a warning. The broker default is 0. Set it with kafka-configs.sh --alter --entity-type groups --entity-name <app-id> --add-config streams.num.standby.replicas=1.

Why does kafka-consumer-groups.sh fail on my Kafka Streams app?

Once the app uses group.protocol=streams, its group is a streams group, and the consumer group tools answer "is not a consumer group". Use kafka-streams-groups.sh to describe its state, members, tasks and lag.

How do I migrate a Kafka Streams app to the new rebalance protocol?

Offline: stop every instance, wait for the session timeout so the group is empty, set group.protocol=streams along with the group configs for standbys and timeouts, then restart. Only committed offsets carry over. Avoid Kafka 4.2.0 brokers, where a migration bug was fixed in 4.2.1.

See it in practice with Conduktor

A streams group still runs on the same changelog and repartition topics, and their partitions and size decide how long a moved task takes to restore. Conduktor Console lets you inspect those internal topics, their configuration and size, and browse their records before you plan a migration.

Next steps