KIP-1118 — Add Deadlock Protection on Producer Network Thread
Accepted Kafka 4.1 Producer
Adds deadlock detection to `KafkaProducer` so that calling `Producer#flush()` from within a `send()` callback throws `KafkaException` instead of blocking indefinitely. Invoking `flush()` from the I/O thread that executes send callbacks creates an irresolvable circular wait, causing application hangs that are difficult to diagnose.
Details
| Author | TengYao Chi |
| Status | Accepted |
| Kafka Version | 4.1 |
| JIRA | KAFKA-10790 |
| Wiki | View on Apache Wiki |
| Created | 2024-11-30 |
| Last Modified | 2025-01-03 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.