You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/02/28 01:15:31 UTC

[GitHub] zhaijack commented on a change in pull request #1298: PIP-13-3/3: auto subscribe based on regex pattern topics changing

zhaijack commented on a change in pull request #1298: PIP-13-3/3: auto subscribe based on regex pattern topics changing
URL: https://github.com/apache/incubator-pulsar/pull/1298#discussion_r171119062
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/PatternTopicsConsumerImpl.java
 ##########
 @@ -36,11 +50,119 @@ public PatternTopicsConsumerImpl(Pattern topicsPattern,
                               CompletableFuture<Consumer> subscribeFuture) {
         super(client, conf, listenerExecutor, subscribeFuture);
         this.topicsPattern = topicsPattern;
+
+        if (this.namespaceName == null) {
+            this.namespaceName = getNameSpaceFromPattern(topicsPattern);
+        }
+        checkArgument(getNameSpaceFromPattern(topicsPattern).toString().equals(this.namespaceName.toString()));
+
+        this.topicsChangeListener = new PatternTopicsChangedListener();
+        scheduledExecutor = (ScheduledExecutorService)listenerExecutor;
 
 Review comment:
   Thanks, will change back to each consumer have one executor.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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