jolshan commented on code in PR #19522: URL: https://github.com/apache/kafka/pull/19522#discussion_r2124459206
########## clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java: ########## @@ -771,6 +773,15 @@ public synchronized void maybeTransitionToErrorState(RuntimeException exception) || exception instanceof InvalidPidMappingException) { transitionToFatalError(exception); } else if (isTransactional()) { + // RetriableExceptions from the Sender thread are converted to Abortable errors + // because they indicate that the transaction cannot be completed after all retry attempts. + // This conversion ensures the application layer treats these errors as abortable, + // preventing duplicate message delivery. Review Comment: maybe not a change we need now, but it isn't totally clear from the method name that this should only be called from the sender thread. Maybe we should refactor this in the future. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org