pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar] sijie commented on a change in pull request #3746: [java client] Bugfix prevent dup consumers for same topic subscription
Date Wed, 06 Mar 2019 02:03:03 GMT
sijie commented on a change in pull request #3746: [java client] Bugfix prevent dup consumers
for same topic subscription
URL: https://github.com/apache/pulsar/pull/3746#discussion_r262766190
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarClientImpl.java
 ##########
 @@ -688,8 +688,10 @@ public void reloadLookUp() throws PulsarClientException {
     private <T> Optional<ConsumerBase<T>> subscriptionExist(ConsumerConfigurationData<?>
conf) {
         synchronized (consumers) {
             Optional<ConsumerBase<?>> subscriber = consumers.keySet().stream()
-                    .filter(consumerBase -> consumerBase.getSubType().equals(PulsarApi.CommandSubscribe.SubType.Shared))
+                    .filter(c -> c.getSubType().equals(PulsarApi.CommandSubscribe.SubType.Shared))
+                    .filter(c -> conf.getTopicNames().contains(c.getTopic()))
 
 Review comment:
   > I think maybe in a new pr would be easier to understand and document refCount and
leave this pr only as a bugfix?
   
   +1

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message