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


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java:
##########
@@ -1184,7 +1184,6 @@ protected void handleSubscribe(final CommandSubscribe 
subscribe) {
                         ServerError error = 
getErrorCodeWithErrorLog(existingConsumerFuture, true,
                                 String.format("Consumer subscribe failure. 
remoteAddress: %s, subscription: %s",
                                         remoteAddress, subscriptionName));
-                        consumers.remove(consumerId, existingConsumerFuture);

Review Comment:
   Additional background: 
   
   If you have two pulsar clients, the consumers registered will be like this:
   - pulsar-client-1
     - connection-1 (one-to-one relationship with `ServerCnx`)
       - consumer-1
       - consumer-2 
     - connection-2
       - consumer-3
       - consumer-4 
   - pulsar-client-2
     - connection-3
       - consumer-5
       - consumer-6 
     - connection-4  
       - consumer-7
       - consumer-8 
   



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