codelipenghui commented on a change in pull request #14727:
URL: https://github.com/apache/pulsar/pull/14727#discussion_r829676764
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java
##########
@@ -307,6 +307,8 @@ public synchronized void removeConsumer(Consumer consumer,
boolean isResetCursor
msgOutFromRemovedConsumer.add(stats.msgOutCounter);
if (dispatcher != null && dispatcher.getConsumers().isEmpty()) {
+ // clear delay message avoid duplicate.
+ dispatcher.clearDelayedMessages();
Review comment:
There are other places will call `cursor.rewind();` in the
PersistentDispatcherMultipleConsumers. The cursor rewind will cause to add the
duplicated delayed message index, and reset the cursor will also introduce this
problem, could you please check them?
--
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]