merlimat commented on a change in pull request #4018: Support multi-host for
pulsar-admin
URL: https://github.com/apache/pulsar/pull/4018#discussion_r274676374
##########
File path:
pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/PulsarAdmin.java
##########
@@ -162,7 +165,10 @@ public PulsarAdmin(String serviceUrl,
this.client = clientBuilder.build();
- this.serviceUrl = serviceUrl;
+ this.serviceNameResolver = new PulsarServiceNameResolver();
+ this.serviceNameResolver.updateServiceUrl(serviceUrl);
+
+ this.serviceUrl = this.serviceNameResolver.resolveHostUri().toString();
Review comment:
Take a look at `AsyncHttpConnector`. In the `apply()` method we should be
able to replace the host with one provided by the serviceNameResolver.
----------------------------------------------------------------
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