Skip to content
Kafka Is Fun

Lesson 5 of 5

Cooperative & Static Membership

1 min read

Overview

Static membership (group.instance.id, KIP-345) lets a consumer rejoin with its identity after a restart without a full rebalance, provided it rejoins within session.timeout.ms; a static member is removed only when its session times out. The id must be unique per consumer and stable across restarts, and a duplicate is fenced with FencedInstanceIdException. There is a cost: a static member that leaves is not removed until the session timeout passes, so scaling down is delayed by the same time. It does not remove every rebalance: a new member joining, or the leader rejoining, still triggers one.

Key configuration

Consumer settingsproperties
group.instance.id=consumer-1 — unique per consumer and stable across restarts (for example derived from a stable pod name)
session.timeout.ms=300000 — must fit the broker's bounds, group.min.session.timeout.ms (default 6000) and group.max.session.timeout.ms (default 1800000); not supported with group.protocol=consumer, which uses the broker's group.consumer.session.timeout.ms

Production tip

Check yourself

A consumer has a group.instance.id and restarts. When does it keep its partitions without triggering a rebalance?

Sources

Checked against Kafka 4.2 documentation on Oct 2026. Draft: not yet reviewed by a Kafka specialist. Releases move on, so confirm against the current documentation before you act on a number.

Try it in the simulator

Guided scenarios for this module — the simulator opens with the exercise already running.

Prefer a picture? Open the live cluster in 3D and watch records move between producer, brokers and consumers.

Browse all troubleshooting entries