A reporting service adds another consumer to handle more orders. Before the new instance can help, the existing consumers must give up some partitions and let it take over. The same kind of ownership change happens when an instance fails or the subscribed topics change.
A consumer group rebalance coordinates these changes. It keeps work distributed among available members, but it also creates a boundary where the application must account for unfinished processing and saved progress.
We’ll follow a partition handoff, compare normal revocation with lost ownership, and examine why repeated rebalances can disrupt an otherwise healthy service. The examples use ordinary consumer groups and the Apache Kafka Java client 4.3.1, with automatic commits disabled. We identify protocol-specific behavior where it matters.