KIP-1306 — Extend ConsumerRebalanceListener with Consumer-Aware methods
Accepted Kafka 4.5 ConsumerClient
Adds consumer-aware rebalance callbacks that pass a restricted RebalanceConsumer view (position, seek, commitSync, pause/resume) to onPartitionsRevoked/Assigned, omitting poll(), close(), subscribe() and wakeup(). The existing ConsumerRebalanceListener signatures expose no consumer, forcing constructor injection of an unrestricted Consumer reference where calling rebalance-unsafe methods compiles fine; Spring Kafka, SmallRye and Micronaut each built the same workaround independently.
Details
| Author | Aditya Kousik |
| Status | Accepted |
| Kafka Version | 4.5 |
| JIRA | KAFKA-20385 |
| Wiki | View on Apache Wiki |
| Created | 2026-03-31 |
| Last Modified | 2026-06-02 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.