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
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.msProduction tip
Check yourself
A consumer has a group.instance.id and restarts. When does it keep its partitions without triggering a rebalance?
Sources
- KIP-345: Static membership protocol (opens in a new tab)
- Consumer configs (4.2 documentation) (opens in a new tab)
- Broker configs (4.2 documentation) (opens in a new tab)
- Design (4.2 documentation) (opens in a new tab)
- Consumer rebalance protocol (4.2 documentation) (opens in a new tab)
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.