Chia-Ping Tsai created KAFKA-21293:
--------------------------------------
Summary: SubscriptionState#unsubscribe should not reset the
rebalance listener
Key: KAFKA-21293
URL: https://issues.apache.org/jira/browse/KAFKA-21293
Project: Kafka
Issue Type: Sub-task
Reporter: Chia-Ping Tsai
Assignee: Chia-Ping Tsai
{code:java}
public synchronized void unsubscribe() {
this.subscription = Collections.emptySet();
this.groupSubscription = Collections.emptySet();
this.assignment.clear();
this.assignedTopicIds = Collections.emptySet();
this.subscribedPattern = null;
this.subscriptionType = SubscriptionType.NONE;
this.listenerContext.set(ListenerContext.NULL_LISTENER); // this
this.assignmentId++;
} {code}
The previous logic did not reset the listener, and {{setRebalanceListener}} is
the only method meant to set or remove it (passing {{{}null{}}}). KIP-1306 does
not say {{unsubscribe()}} should clear the listener either.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)