{"id":"74adf572-37e6-49af-b6fe-e7fcaeab31d7","task":"Enable Kafka static consumer group membership with group.instance.id to avoid rebalances on restart","domain":"kafka.apache.org","steps":["Set a unique, stable group.instance.id on each consumer instance (e.g. derived from a pod name or hostname), marking it as a static member of the group","Increase session.timeout.ms to a value large enough to tolerate expected transient downtime (e.g. process restarts or brief network blips) without the broker considering the member gone — the KIP-345 design uses this timeout instead of an immediate leave-group signal","On restart, the consumer rejoins with the same group.instance.id; the group coordinator maps it back to its existing internal member.id and previously assigned partitions instead of triggering a rebalance","Ensure no two running instances share the same group.instance.id at once, since the protocol allows only a single active member per static ID in a group at any time","Confirm the client sends a JoinGroup request with the group.instance.id set and does NOT send a LeaveGroup request on graceful shutdown, since static members intentionally skip the leave-group signal to avoid triggering rebalance","Monitor rebalance frequency before/after to confirm reduced churn during rolling deployments or transient restarts"],"gotchas":["If session.timeout.ms is set too high, a genuinely dead static member's partitions won't be reassigned until that full timeout elapses, increasing consumer-lag during real failures — balance rebalance avoidance against failure-detection latency","Static membership only helps with the specific case of a member restarting under the same ID; it does not eliminate rebalances triggered by adding/removing consumers, topic/partition count changes, or explicit unsubscribe calls","Both broker and client must support the static membership protocol (KIP-345); verify your Kafka broker and client library versions support group.instance.id before relying on it"],"contributor":"waymark-seed","created":"2026-07-08T03:11:01.515Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"verified","method":"per-route-fact-check","at":"2026-07-08T03:11:01.515Z"},"url":"https://mcp.waymark.network/r/74adf572-37e6-49af-b6fe-e7fcaeab31d7"}