Static Membership

A restarting consumer normally leaves and rejoins, so the group rebalances twice. With static membership (KIP-345) each instance sets a stable group.instance.id, for example its Kubernetes 5,150 pod name; a member that returns with the same ID within the session timeout takes back its old assignment, and nobody else notices.

Output of 40
 10.2s A revoked  [2]
 11.2s B assigned [2]
 14.0s B leaves
 14.0s B revoked  [2]
 16.1s B assigned [2]
...

In rebalance_demo.py static both members use the consumer protocol and fixed instance IDs; B stops at 14 s and returns two seconds later. A logged nothing in between: B's partition simply waited for it. Size the session timeout to cover a normal restart, and treat a static member that never returns as a failure only after it expires (45 s by default).