Skip to content
Exercise · Kafka consumers · lesson 8 of 9

Exercise: commit before giving a partition away

During a rebalance a partition moves from one consumer to another. If the old owner processed records but did not commit the offset, the new one reads them again. Kafka warns in advance: before giving partitions away, the consumer gets an onPartitionsRevoked call.