[ 
https://issues.apache.org/jira/browse/KAFKA-18476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matthias J. Sax reassigned KAFKA-18476:
---------------------------------------

    Assignee: Matthias J. Sax

> 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
>            Assignee: Matthias J. Sax
>            Priority: Minor
>
> 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)

Reply via email to