lianetm commented on code in PR #16686:
URL: https://github.com/apache/kafka/pull/16686#discussion_r1700606075


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java:
##########
@@ -1227,6 +1227,7 @@ public void close(Duration timeout) {
 
     private void close(Duration timeout, boolean swallowException) {
         log.trace("Closing the Kafka consumer");
+        boolean wasInterrupted = Thread.interrupted();

Review Comment:
   hey, sorry if my "while closing" on the jira is misleading, but I think the 
stress test that revealed this was the "before" case: test that had a "finally" 
clause, where it closed the consumer. Interrupting the thread would lead to 
that finally, and at that point it seemed that the classic consumer would do a 
clean leave but the new consumer didn't. 



-- 
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

Reply via email to