You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Matthias J. Sax (Jira)" <ji...@apache.org> on 2025/01/10 22:42:00 UTC
[jira] [Created] (KAFKA-18476) KafkaStreams should swallow TransactionAbortedException
Matthias J. Sax created KAFKA-18476:
---------------------------------------
Summary: KafkaStreams should swallow TransactionAbortedException
Key: KAFKA-18476
URL: https://issues.apache.org/jira/browse/KAFKA-18476
Project: Kafka
Issue Type: Improvement
Components: streams
Reporter: Matthias J. Sax
A TransactionAbortedException could be handed back to the producer `Callback` if there is pending batches which are flushed after `abortTransaction()` was called.
KafkaStreams only calls `abortTransaction()` after some previous error (could be fatal, for which we just cleanup and shutdown, but could also be a recoverable error for which KS would cleanup and resume), and thus a TransactionAbortedException is just a follow up error that should be swallowed.
Right now, `TransactionAbortedError` is passed into the ProductionExceptionHandler callback, and thus KS would FAIL by default, even after a recoverable error. Instead of passing the exception into the error handler, and let the user code take care of it, KS should just swallow the exception directly, and not call the handler at all.
The current workaround to avoid failing for a recoverable error would be, to write a custom ProductionExceptionHandler which always returns CONTINUE for TransactionAbortedException.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)