Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

KIP-345 — static consumer-group membership

Status: partial — see the KIP index.

What's missing

FENCED_INSTANCE_ID fencing of duplicate static members. In Apache, a second consumer joining with an already-active group.instance.id (but a different member ID) is fenced with error 82 so a misconfigured duplicate can't hijack the instance's partitions. kaas defines no such check — the error code appears nowhere in the tree — so a duplicate static member is treated as a rejoin rather than fenced.

What the KIP changes in Apache Kafka

KIP-345 lets a consumer declare a stable identity (group.instance.id). The coordinator then treats restarts of that process as the same member: no rebalance on a bounce within the session timeout, and no partition churn for rolling restarts of stable fleets.

What kaas has

The behaviour that matters for rolling restarts:

  • group.instance.id is decoded and carried through join/sync/leave state (crates/kaas-coordinator/src/group.rs threads group_instance_id through members, join waiters, and describe output).
  • Static members survive the rebalance-eviction sweep: evict_non_rejoining_members only evicts members whose group_instance_id is None — a static member that hasn't re-joined within rebalance_timeout_ms keeps its slot instead of being dropped (crates/kaas-coordinator/src/group.rs).

See the per-API details on JoinGroup and LeaveGroup.

How the partial state is verified

Group-coordinator unit tests in crates/kaas-coordinator/src/group.rs cover static-member retention across rebalances; scripts/kafka-consumer-groups.sh exercises group lifecycle end-to-end. The missing fencing is verifiable by inspection: FENCED_INSTANCE_ID has no definition or use anywhere in the workspace.