sijie commented on a change in pull request #4139: Detect duplicate consumers 
by consumer name
URL: https://github.com/apache/pulsar/pull/4139#discussion_r278794966
 
 

 ##########
 File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarClientImpl.java
 ##########
 @@ -682,7 +682,7 @@ public void reloadLookUp() throws PulsarClientException {
             Optional<ConsumerBase<?>> subscriber = consumers.keySet().stream()
                     .filter(c -> 
c.getSubType().equals(PulsarApi.CommandSubscribe.SubType.Shared))
                     .filter(c -> conf.getTopicNames().contains(c.getTopic()))
-                    .filter(c -> 
c.getSubscription().equals(conf.getSubscriptionName()))
+                    .filter(c -> 
c.getConsumerName().equals(conf.getConsumerName()))
 
 Review comment:
   I think it needs both subscription name and consumer name. 
   
   Subscription name is the "consumer group" name. Consumer name is for 
identifying a consumer in the group.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to