adikou commented on code in PR #22271:
URL: https://github.com/apache/kafka/pull/22271#discussion_r3479413148
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/SubscriptionState.java:
##########
@@ -189,20 +198,47 @@ else if (this.subscriptionType != type)
throw new IllegalStateException(SUBSCRIPTION_EXCEPTION_MESSAGE);
}
+ /**
+ * deprecated Visible for testing only. Will be removed in a follow-on
cleanup PR.
+ * Use {@link #subscribe(Set)} and {@link
#setRebalanceListener} instead.
+ */
public synchronized boolean subscribe(Set<String> topics,
Optional<ConsumerRebalanceListener> listener) {
- registerRebalanceListener(listener);
+ listener.ifPresent(l -> this.rebalanceListener = new
SimpleInternalRebalanceListener(l));
Review Comment:
These is a temp fix. I'll remove these methods before 4.4.0 cut. I just
didn't want the diff to blow up. All these methods with the optionals sets
going away with [KAFKA-20684](https://issues.apache.org/jira/browse/KAFKA-20684)
--
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]