KIP-654 — Aborted transaction with non-flushed data should throw a non-fatal exception
Accepted Kafka 2.7 TransactionsProducer
KIP-654 introduces a `TransactionAbortedException` (extending `ApiException`) thrown when a transaction is aborted via `KafkaProducer.abortTransaction()` while there are still non-flushed pending records in the accumulator. The existing `KafkaException("Failing batch since transaction was aborted")` is treated as fatal by many error-handling frameworks, forcing clients to restart producers unnecessarily when the abort is actually a recoverable, expected flow.
Details
| Author | Gokul Srinivas |
| Status | Accepted |
| Kafka Version | 2.7 |
| JIRA | KAFKA-10186 |
| Wiki | View on Apache Wiki |
| Created | 2020-08-06 |
| Last Modified | 2020-09-10 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.