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


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java:
##########
@@ -2241,8 +2253,9 @@ private void release() {
             currentThread.set(NO_CURRENT_THREAD);
     }
 
-    private void subscribeInternal(Pattern pattern, 
Optional<ConsumerRebalanceListener> listener) {
+    private void subscribeInternal(Pattern pattern, ConsumerRebalanceListener 
listener) {
         acquireAndEnsureOpen();
+        subscriptions.setRebalanceListener(listener, this);

Review Comment:
   if listener == null here, seems this will remove a listener that was set 
before, right? 
   setRebalanceListener(x) + subscribe(Pattern)
   (are we missing the non-null check that was added for the other internal 
calls to setRebalanceListener?)
   



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