philipnee commented on code in PR #12149: URL: https://github.com/apache/kafka/pull/12149#discussion_r1178259026
########## clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java: ########## @@ -328,6 +333,21 @@ void runOnce() { client.poll(pollTimeout, currentTimeMs); } + // We handle {@code TransactionalIdAuthorizationException} and {@code ClusterAuthorizationException} by first + // failing the inflight requests, then transition the state to UNINITIALIZED so that the user doesn't need to + // instantiate the producer again. + private boolean shouldHandleAuthorizationError(RuntimeException exception) { Review Comment: it seems like all of the non-initProducerId TransactionalIdAuthorizationException and ClusterAuthorizationException are fatal. For the poll: I think we don't need it because there's no outbound request, as it should've been already polled in the previous `runOnce`. The tests seem to work without so i'll remove it. -- 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