KIP-957 — Support Async runtimes
Discarded Consumer
Proposes relaxing the `KafkaConsumer`'s single-thread reentrance check (`acquire()`) to allow callbacks (e.g., `onPartitionsRevoked`) to call back into the consumer from a different thread, enabling async runtimes (Kotlin coroutines, ZIO) to perform offset commits inside rebalance callbacks. The current strict thread-ownership check in `acquire()` makes it structurally impossible for async runtimes to call `consumer.commitSync()` from within a rebalance listener without deadlocking or triggering a `ConcurrentModificationException`.
Details
| Author | Erik van Oosten |
| Status | Discarded |
| JIRA | KAFKA-14972 |
| Wiki | View on Apache Wiki |
| Created | 2023-07-22 |
| Last Modified | 2023-08-05 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.