frankvicky commented on code in PR #17614:
URL: https://github.com/apache/kafka/pull/17614#discussion_r1844938160


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ClassicKafkaConsumer.java:
##########
@@ -265,7 +266,7 @@ public class ClassicKafkaConsumer<K, V> implements 
ConsumerDelegate<K, V> {
             // call close methods if internal objects are already constructed; 
this is to prevent resource leak. see KAFKA-2121
             // we do not need to call `close` at all when `log` is null, which 
means no internal objects were initialized.
             if (this.log != null) {
-                close(Duration.ZERO, true);
+                close(Duration.ZERO, GroupMembershipOperation.DEFAULT, true);

Review Comment:
   Thanks for pointing out.
   I think this was accidental. 
   
   IMHO, we should keep using `DEFAULT`for both the classic and async 
consumers, as the original purpose of `GroupMembershipOperation` was to allow 
users to explicitly decide the operation they want to take when closing the 
consumer. 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to