Dream95 commented on code in PR #25916:
URL: https://github.com/apache/pulsar/pull/25916#discussion_r3339780338
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java:
##########
@@ -1300,8 +1300,10 @@ public CompletableFuture<Void> unsubscribeAsync(String
topicName) {
});
removeTopic(topicName);
- if (unAckedMessageTracker instanceof
UnAckedTopicMessageTracker) {
- ((UnAckedTopicMessageTracker)
unAckedMessageTracker).removeTopicMessages(topicName);
+ if (unAckedMessageTracker instanceof
UnAckedTopicMessageTracker tracker) {
+ tracker.removeTopicMessages(topicName);
+ } else if (unAckedMessageTracker instanceof
UnAckedTopicMessageRedeliveryTracker tracker){
+ tracker.removeTopicMessages(topicName);
}
Review Comment:
They share the same base class , but removeTopicMessages is not declared on
that base type.
--
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]