poorbarcode commented on code in PR #19934:
URL: https://github.com/apache/pulsar/pull/19934#discussion_r1156658262


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumers.java:
##########
@@ -102,6 +102,11 @@ public class 
PersistentStickyKeyDispatcherMultipleConsumers extends PersistentDi
 
     @Override
     public synchronized void addConsumer(Consumer consumer) throws 
BrokerServiceException {
+        if (IS_CLOSED_UPDATER.get(this) == TRUE) {
+            log.warn("[{}] Dispatcher is already closed. Closing consumer {}", 
name, consumer);
+            consumer.disconnect();
+            return;
+        }
         super.addConsumer(consumer);

Review Comment:
   @Technoboy- What do you think about this?



-- 
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]

Reply via email to