You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "hangc0276 (via GitHub)" <gi...@apache.org> on 2023/07/07 02:26:14 UTC
[GitHub] [pulsar-site] hangc0276 commented on a diff in pull request #620: [fix][doc]: add the primary auth config on cluster failover example
hangc0276 commented on code in PR #620:
URL: https://github.com/apache/pulsar-site/pull/620#discussion_r1255150515
##########
docs/client-libraries-cluster-level-failover.md:
##########
@@ -38,7 +38,12 @@ This is an example of how to construct a Java Pulsar client to use automatic clu
private PulsarClient getAutoFailoverClient() throws PulsarClientException {
String primaryUrl = "pulsar+ssl://localhost:6651";
String secondaryUrl = "pulsar+ssl://localhost:6661";
+ String primaryTlsTrustCertsFilePath = "primary/path";
String secondaryTlsTrustCertsFilePath = "secondary/path";
+ Authentication primaryAuthentication = AuthenticationFactory.create(
Review Comment:
The primaryAuthentication is in pulsarClient initiation and we need to add a configuration for pulsar client creation. Otherwise, users will be confused by `primaryAuthentication` and `primaryTlsTrustCertsFilePath` initiated without use.
```
PulsarClient pulsarClient = PulsarClient.builder()
.authentication(primaryAuthentication)
.tlsTrustCertsFilePath(primaryTlsTrustCertsFilePath)
.serviceUrl("pulsar://localhost:6650")
.build();
````
--
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-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org