BewareMyPower commented on code in PR #170: URL: https://github.com/apache/pulsar-client-cpp/pull/170#discussion_r1080826113
########## include/pulsar/Client.h: ########## @@ -66,6 +67,31 @@ class PULSAR_PUBLIC Client { */ Client(const std::string& serviceUrl, const ClientConfiguration& clientConfiguration); + /** + * Create a Pulsar client object connecting to the specified cluster address and using the default + * configuration. + * + * <p>Instead of specifying a static service URL string (with {@link #serviceUrl(String)}), an application + * can pass a {@link ServiceUrlProvider} function that dynamically provide a service URL. + * + * @param serviceUrlProvider The serviceUrlProvider used to generate ServiceUrl. + * @throw std::invalid_argument if `serviceUrlProvider()` return a invalid url. + */ + Client(ServiceUrlProvider serviceUrlProvider); Review Comment: LGTM. Before this PR, `serviceUrl` is a required argument. But after this PR, only one of `serviceUrl` and `serviceUrlProvider` should be provided. -- 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. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org