[
https://issues.apache.org/jira/browse/KAFKA-21293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chia-Ping Tsai resolved KAFKA-21293.
------------------------------------
Fix Version/s: 4.5.0
Resolution: Fixed
> 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: Ken Huang
> Priority: Minor
> Fix For: 4.5.0
>
>
> {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)