---
title: "KIP-345 explained: static membership and group.instance.id"
description: "KIP-345 in plain words: how a Kafka consumer with a group.instance.id can restart without a rebalance and get its own partitions back. Status and limits."
url: https://monedula.dev/kafka/kips/kip-345/
---

# KIP-345: static membership, restart a consumer without a rebalance

Consumer groups and queues · Shipped · since Kafka 2.3 · status checked November 2026.

KIP-345 gives a consumer a fixed identity, group.instance.id. When a static member restarts within session.timeout.ms, it rejoins under the same identity and gets the same partitions back, with no rebalance for the rest of the group. Rolling restarts and short crashes stop shuffling partitions around.

## At a glance

- Proposal: KIP-345, Introduce static membership protocol to reduce consumer rebalances
- Status: Shipped. Since Kafka 2.3 (2019), opt-in with group.instance.id.
- Area: Consumer groups and queues
- Proposal page: [KIP-345 on the Apache Kafka wiki](https://cwiki.apache.org/confluence/display/KAFKA/KIP-345%3A+Introduce+static+membership+protocol+to+reduce+consumer+rebalances)

## Why it was needed

A normal consumer gets a new member id every time it starts. A restart therefore looks like one member leaving and another joining, which means two rebalances, and with eager rebalancing the whole group pauses twice. In a rolling deploy of 50 instances that is 100 rebalances, and local state such as Kafka Streams stores may be moved to another instance for no reason.

## What it changes

A consumer configured with group.instance.id is a static member. It does not send a leave request when it shuts down, and the coordinator keeps its partitions reserved until session.timeout.ms runs out. If it comes back in time it simply takes them again. If it does not, it is removed and the group rebalances as usual.

## How to use it

- Give each consumer a stable, unique group.instance.id, for example the pod name of a StatefulSet.
- Raise session.timeout.ms above the time a restart takes, so a deploy finishes inside the window.

## Where it stands

Shipped in Kafka 2.3 and supported on both the classic and the KIP-848 consumer protocol. Two instances with the same group.instance.id fence each other, so the id must be unique per running process.

## What comes next

Stable. With KIP-848 the broker handles static members natively, and Kafka 4.4 added static membership to the streams rebalance protocol (KIP-1071).

## See it in the simulator

- [Kafka static membership: group.instance.id avoids rebalances](https://monedula.dev/kafka-simulator/scenarios/static-membership/) (Static membership: avoid rebalance), step 5: static member rejoins in time. s2 restarts with the SAME instance.id at t=2800 - within session.timeout.ms of its crash (1800 ms < 2000 ms here; timings are compressed, real brokers require at least 6 s) - so the coordinator’s held slot lets it resume p1 in place with NO rebalance (s1 still owns only p0). d2 is still absent, its eviction one tick away. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=02.3.3&t=4)
- [Kafka static membership: group.instance.id avoids rebalances](https://monedula.dev/kafka-simulator/scenarios/static-membership/) (Static membership: avoid rebalance), step 7: outcome: rebalance vs retained. Final state. cg-dyn: d1 owns [p0,p1] after the rebalance, d2 lingers as an evicted ghost. cg-stat: the assignment never moved - s1 → p0, s2 → p1 - and there is no ghost. Static membership turned a crash-and-restart-within-session.timeout.ms into a no-op for the group. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=02.3.3&t=6)

## Sources

- [KIP-345: Introduce static membership protocol to reduce consumer rebalances](https://cwiki.apache.org/confluence/display/KAFKA/KIP-345%3A+Introduce+static+membership+protocol+to+reduce+consumer+rebalances)

## Related KIPs

- [KIP-429 explained: cooperative incremental rebalancing](https://monedula.dev/kafka/kips/kip-429/)
- [KIP-848 explained: the new consumer rebalance protocol](https://monedula.dev/kafka/kips/kip-848/)
