You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by vi...@apache.org on 2024/04/28 19:16:35 UTC
(pulsar-site) branch main updated: Added the required serviceUrlProvider method for building PulsarClient. (#891)
This is an automated email from the ASF dual-hosted git repository.
visortelle pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git
The following commit(s) were added to refs/heads/main by this push:
new c86ecf30d563 Added the required serviceUrlProvider method for building PulsarClient. (#891)
c86ecf30d563 is described below
commit c86ecf30d563410fbb57ea33374bbefca4547556
Author: Malla Sandeep <sa...@gmail.com>
AuthorDate: Mon Apr 29 00:46:30 2024 +0530
Added the required serviceUrlProvider method for building PulsarClient. (#891)
---
docs/client-libraries-cluster-level-failover.md | 6 ++++--
versioned_docs/version-2.10.x/client-libraries-java.md | 7 +++++--
versioned_docs/version-2.11.x/client-libraries-java.md | 7 +++++--
.../version-3.0.x/client-libraries-cluster-level-failover.md | 6 ++++--
.../version-3.1.x/client-libraries-cluster-level-failover.md | 6 ++++--
.../version-3.2.x/client-libraries-cluster-level-failover.md | 6 ++++--
6 files changed, 26 insertions(+), 12 deletions(-)
diff --git a/docs/client-libraries-cluster-level-failover.md b/docs/client-libraries-cluster-level-failover.md
index f63cddc27a90..754362a877b1 100644
--- a/docs/client-libraries-cluster-level-failover.md
+++ b/docs/client-libraries-cluster-level-failover.md
@@ -66,7 +66,8 @@ private PulsarClient getAutoFailoverClient() throws PulsarClientException {
.build();
PulsarClient pulsarClient = PulsarClient.builder()
- .authentication(primaryAuthentication)
+ .serviceUrlProvider(failover)
+ .authentication(primaryAuthentication)
.tlsTrustCertsFilePath(primaryTlsTrustCertsFilePath)
.build();
@@ -113,6 +114,7 @@ public PulsarClient getControlledFailoverClient() throws IOException {
PulsarClient pulsarClient =
PulsarClient.builder()
+ .serviceUrlProvider(provider)
.build();
provider.initialize(pulsarClient);
@@ -155,4 +157,4 @@ Assume that you want to connect Pulsar client 1 to cluster A.
}
```
-3. Pulsar client 1 connects to cluster A using credential *c1*.
\ No newline at end of file
+3. Pulsar client 1 connects to cluster A using credential *c1*.
diff --git a/versioned_docs/version-2.10.x/client-libraries-java.md b/versioned_docs/version-2.10.x/client-libraries-java.md
index 6b5e81b49da7..0027a6b04071 100644
--- a/versioned_docs/version-2.10.x/client-libraries-java.md
+++ b/versioned_docs/version-2.10.x/client-libraries-java.md
@@ -376,7 +376,8 @@ private PulsarClient getAutoFailoverClient() throws PulsarClientException {
.build();
PulsarClient pulsarClient = PulsarClient.builder()
- .authentication(primaryAuthentication)
+ .serviceUrlProvider(failover)
+ .authentication(primaryAuthentication)
.tlsTrustCertsFilePath(primaryTlsTrustCertsFilePath)
.build();
@@ -419,7 +420,9 @@ public PulsarClient getControlledFailoverClient() throws IOException {
.urlProviderHeader(header)
.build();
- PulsarClient pulsarClient = PulsarClient.builder().build();
+ PulsarClient pulsarClient = PulsarClient.builder()
+ .serviceUrlProvider(provider)
+ .build();
provider.initialize(pulsarClient);
return pulsarClient;
diff --git a/versioned_docs/version-2.11.x/client-libraries-java.md b/versioned_docs/version-2.11.x/client-libraries-java.md
index d0b36370188c..8bc0753c502b 100644
--- a/versioned_docs/version-2.11.x/client-libraries-java.md
+++ b/versioned_docs/version-2.11.x/client-libraries-java.md
@@ -1238,7 +1238,8 @@ private PulsarClient getAutoFailoverClient() throws PulsarClientException {
.build();
PulsarClient pulsarClient = PulsarClient.builder()
- .authentication(primaryAuthentication)
+ .serviceUrlProvider(failover)
+ .authentication(primaryAuthentication)
.tlsTrustCertsFilePath(primaryTlsTrustCertsFilePath)
.build();
@@ -1281,7 +1282,9 @@ public PulsarClient getControlledFailoverClient() throws IOException {
.urlProviderHeader(header)
.build();
- PulsarClient pulsarClient = PulsarClient.builder().build();
+ PulsarClient pulsarClient = PulsarClient.builder()
+ .serviceUrlProvider(provider)
+ .build();
provider.initialize(pulsarClient);
return pulsarClient;
diff --git a/versioned_docs/version-3.0.x/client-libraries-cluster-level-failover.md b/versioned_docs/version-3.0.x/client-libraries-cluster-level-failover.md
index e84acc436b00..2b3a8c9f8be3 100644
--- a/versioned_docs/version-3.0.x/client-libraries-cluster-level-failover.md
+++ b/versioned_docs/version-3.0.x/client-libraries-cluster-level-failover.md
@@ -65,7 +65,8 @@ private PulsarClient getAutoFailoverClient() throws PulsarClientException {
.build();
PulsarClient pulsarClient = PulsarClient.builder()
- .authentication(primaryAuthentication)
+ .serviceUrlProvider(failover)
+ .authentication(primaryAuthentication)
.tlsTrustCertsFilePath(primaryTlsTrustCertsFilePath)
.build();
@@ -112,6 +113,7 @@ public PulsarClient getControlledFailoverClient() throws IOException {
PulsarClient pulsarClient =
PulsarClient.builder()
+ .serviceUrlProvider(provider)
.build();
provider.initialize(pulsarClient);
@@ -154,4 +156,4 @@ Assume that you want to connect Pulsar client 1 to cluster A.
}
```
-3. Pulsar client 1 connects to cluster A using credential *c1*.
\ No newline at end of file
+3. Pulsar client 1 connects to cluster A using credential *c1*.
diff --git a/versioned_docs/version-3.1.x/client-libraries-cluster-level-failover.md b/versioned_docs/version-3.1.x/client-libraries-cluster-level-failover.md
index e84acc436b00..2b3a8c9f8be3 100644
--- a/versioned_docs/version-3.1.x/client-libraries-cluster-level-failover.md
+++ b/versioned_docs/version-3.1.x/client-libraries-cluster-level-failover.md
@@ -65,7 +65,8 @@ private PulsarClient getAutoFailoverClient() throws PulsarClientException {
.build();
PulsarClient pulsarClient = PulsarClient.builder()
- .authentication(primaryAuthentication)
+ .serviceUrlProvider(failover)
+ .authentication(primaryAuthentication)
.tlsTrustCertsFilePath(primaryTlsTrustCertsFilePath)
.build();
@@ -112,6 +113,7 @@ public PulsarClient getControlledFailoverClient() throws IOException {
PulsarClient pulsarClient =
PulsarClient.builder()
+ .serviceUrlProvider(provider)
.build();
provider.initialize(pulsarClient);
@@ -154,4 +156,4 @@ Assume that you want to connect Pulsar client 1 to cluster A.
}
```
-3. Pulsar client 1 connects to cluster A using credential *c1*.
\ No newline at end of file
+3. Pulsar client 1 connects to cluster A using credential *c1*.
diff --git a/versioned_docs/version-3.2.x/client-libraries-cluster-level-failover.md b/versioned_docs/version-3.2.x/client-libraries-cluster-level-failover.md
index f63cddc27a90..754362a877b1 100644
--- a/versioned_docs/version-3.2.x/client-libraries-cluster-level-failover.md
+++ b/versioned_docs/version-3.2.x/client-libraries-cluster-level-failover.md
@@ -66,7 +66,8 @@ private PulsarClient getAutoFailoverClient() throws PulsarClientException {
.build();
PulsarClient pulsarClient = PulsarClient.builder()
- .authentication(primaryAuthentication)
+ .serviceUrlProvider(failover)
+ .authentication(primaryAuthentication)
.tlsTrustCertsFilePath(primaryTlsTrustCertsFilePath)
.build();
@@ -113,6 +114,7 @@ public PulsarClient getControlledFailoverClient() throws IOException {
PulsarClient pulsarClient =
PulsarClient.builder()
+ .serviceUrlProvider(provider)
.build();
provider.initialize(pulsarClient);
@@ -155,4 +157,4 @@ Assume that you want to connect Pulsar client 1 to cluster A.
}
```
-3. Pulsar client 1 connects to cluster A using credential *c1*.
\ No newline at end of file
+3. Pulsar client 1 connects to cluster A using credential *c1*.