merlimat commented on a change in pull request #1279: PIP-13-2/3: support regex based subscription URL: https://github.com/apache/incubator-pulsar/pull/1279#discussion_r170433429
########## File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/BinaryProtoLookupService.java ########## @@ -177,6 +180,46 @@ public String getServiceUrl() { return serviceAddress.toString(); } + @Override + public CompletableFuture<List<String>> getTopicsUnderNamespace(NamespaceName namespace) { + return getTopicsUnderNamespace(serviceAddress, namespace); + } + + private CompletableFuture<List<String>> getTopicsUnderNamespace(InetSocketAddress socketAddress, + NamespaceName namespace) { + CompletableFuture<List<String>> topicsFuture = new CompletableFuture<List<String>>(); + + client.getCnxPool().getConnection(socketAddress).thenAccept(clientCnx -> { Review comment: At the higher level, we should have a way to retry few times this call, otherwise if we're unlike when starting our consumer we might get exception even if there is a brief transient problem (eg: 1 single broker going down). ---------------------------------------------------------------- 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