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 it own 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: us...@infra.apache.org With regards, Apache Git Services