Kafka Consumer Group Rebalancing: Cooperative Sticky, Static Membership and the KIP-848 Protocol
A practical guide to the mechanism that decides whether your Kafka consumer is stable or produces lag on every deploy: what happens step by step during an eager rebalance and why it stops the whole group, the three clocks that trigger it (heartbeat.interval.ms, session.timeout.ms and max.poll.interval.ms) and how to tell a dead process from a live-but-stuck one, incremental cooperative rebalancing with its mandatory two-deploy migration, static membership with group.instance.id and its real trade-off, and the new KIP-848 protocol that moves assignment computation to the broker and relocates session.timeout.ms and heartbeat.interval.ms server-side. Includes a complete Python consumer with properly distinguished on_assign, on_revoke and on_lost callbacks, the pause/resume pattern for slow work without wrecking failure detection, eight recurring mistakes, the metrics and commands to diagnose a group stuck in PreparingRebalance, and a production checklist. With production-ready Python code and client and broker configuration.
Verificando acceso...