You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by li...@apache.org on 2022/08/29 01:41:39 UTC

[pulsar] branch master updated: [improve][doc] sync Connection URLs section (#17304)

This is an automated email from the ASF dual-hosted git repository.

liuyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 076205d9128 [improve][doc] sync Connection URLs section (#17304)
076205d9128 is described below

commit 076205d912876eaa5794ef5b357084b3b47200c2
Author: tison <wa...@gmail.com>
AuthorDate: Mon Aug 29 09:41:32 2022 +0800

    [improve][doc] sync Connection URLs section (#17304)
---
 site2/docs/client-libraries-cpp.md    | 16 +++++-----------
 site2/docs/client-libraries-dotnet.md | 22 ++++++++++++++++++++++
 site2/docs/client-libraries-go.md     | 22 ++++------------------
 site2/docs/client-libraries-java.md   | 20 +++-----------------
 site2/docs/client-libraries-node.md   | 15 +++++----------
 site2/docs/client-libraries-python.md | 24 ++++++++++++++++++++++--
 6 files changed, 61 insertions(+), 58 deletions(-)

diff --git a/site2/docs/client-libraries-cpp.md b/site2/docs/client-libraries-cpp.md
index 235af0804bf..c4dcafe43a7 100644
--- a/site2/docs/client-libraries-cpp.md
+++ b/site2/docs/client-libraries-cpp.md
@@ -341,30 +341,24 @@ ${PULSAR_HOME}/pulsar-client-cpp/build/lib/Release/pulsar.dll
 
 ## Connection URLs
 
-To connect Pulsar using client libraries, you need to specify a Pulsar protocol URL.
+To connect to Pulsar using client libraries, you need to specify a [Pulsar protocol](developing-binary-protocol.md) URL.
 
-Pulsar protocol URLs are assigned to specific clusters, you can use the Pulsar URI scheme. The default port is `6650`. The following is an example for localhost.
+You can assign Pulsar protocol URLs to specific clusters and use the `pulsar` scheme. The following is an example of `localhost` with the default port `6650`:
 
 ```http
-
 pulsar://localhost:6650
-
 ```
 
-In a Pulsar cluster in production, the URL looks as follows. 
+If you have multiple brokers, separate `IP:port` by commas:
 
 ```http
-
-pulsar://pulsar.us-west.example.com:6650
-
+pulsar://localhost:6550,localhost:6651,localhost:6652
 ```
 
-If you use TLS authentication, you need to add `ssl`, and the default port is `6651`. The following is an example.
+If you use [TLS](security-tls-authentication.md) authentication, add `+ssl` in the scheme:
 
 ```http
-
 pulsar+ssl://pulsar.us-west.example.com:6651
-
 ```
 
 ## Create a producer
diff --git a/site2/docs/client-libraries-dotnet.md b/site2/docs/client-libraries-dotnet.md
index d8c3ad5b4b6..a0e4f89629c 100644
--- a/site2/docs/client-libraries-dotnet.md
+++ b/site2/docs/client-libraries-dotnet.md
@@ -54,6 +54,28 @@ To install the Pulsar C# client library, following these steps:
        
        ```
 
+## Connection URLs
+
+To connect to Pulsar using client libraries, you need to specify a [Pulsar protocol](developing-binary-protocol.md) URL.
+
+You can assign Pulsar protocol URLs to specific clusters and use the `pulsar` scheme. The following is an example of `localhost` with the default port `6650`:
+
+```http
+pulsar://localhost:6650
+```
+
+If you have multiple brokers, separate `IP:port` by commas:
+
+```http
+pulsar://localhost:6550,localhost:6651,localhost:6652
+```
+
+If you use [TLS](security-tls-authentication.md) authentication, add `+ssl` in the scheme:
+
+```http
+pulsar+ssl://pulsar.us-west.example.com:6651
+```
+
 ## Client
 
 This section describes some configuration examples for the Pulsar C# client.
diff --git a/site2/docs/client-libraries-go.md b/site2/docs/client-libraries-go.md
index 4f64ea8f6e0..f9e74dcdf06 100644
--- a/site2/docs/client-libraries-go.md
+++ b/site2/docs/client-libraries-go.md
@@ -53,36 +53,22 @@ $ ./test_example
 
 To connect to Pulsar using client libraries, you need to specify a [Pulsar protocol](developing-binary-protocol.md) URL.
 
-Pulsar protocol URLs are assigned to specific clusters, use the `pulsar` scheme and have a default port of 6650. Here's an example for `localhost`:
+You can assign Pulsar protocol URLs to specific clusters and use the `pulsar` scheme. The following is an example of `localhost` with the default port `6650`:
 
 ```http
-
 pulsar://localhost:6650
-
-```
-
-If you have multiple brokers, you can set the URL as below.
-
-```
-
-pulsar://localhost:6550,localhost:6651,localhost:6652
-
 ```
 
-A URL for a production Pulsar cluster may look something like this:
+If you have multiple brokers, separate `IP:port` by commas:
 
 ```http
-
-pulsar://pulsar.us-west.example.com:6650
-
+pulsar://localhost:6550,localhost:6651,localhost:6652
 ```
 
-If you're using [TLS](security-tls-authentication.md) authentication, the URL will look like something like this:
+If you use [TLS](security-tls-authentication.md) authentication, add `+ssl` in the scheme:
 
 ```http
-
 pulsar+ssl://pulsar.us-west.example.com:6651
-
 ```
 
 ## Create a client
diff --git a/site2/docs/client-libraries-java.md b/site2/docs/client-libraries-java.md
index 26f9f784200..e4978f01037 100644
--- a/site2/docs/client-libraries-java.md
+++ b/site2/docs/client-libraries-java.md
@@ -71,36 +71,22 @@ dependencies {
 
 To connect to Pulsar using client libraries, you need to specify a [Pulsar protocol](developing-binary-protocol.md) URL.
 
-You can assign Pulsar protocol URLs to specific clusters and use the `pulsar` scheme. The default port is `6650`. The following is an example of `localhost`.
+You can assign Pulsar protocol URLs to specific clusters and use the `pulsar` scheme. The following is an example of `localhost` with the default port `6650`:
 
 ```http
-
 pulsar://localhost:6650
-
 ```
 
-If you have multiple brokers, the URL is as follows.
+If you have multiple brokers, separate `IP:port` by commas:
 
 ```http
-
 pulsar://localhost:6550,localhost:6651,localhost:6652
-
-```
-
-A URL for a production Pulsar cluster is as follows.
-
-```http
-
-pulsar://pulsar.us-west.example.com:6650
-
 ```
 
-If you use [TLS](security-tls-authentication.md) authentication, the URL is as follows. 
+If you use [TLS](security-tls-authentication.md) authentication, add `+ssl` in the scheme:
 
 ```http
-
 pulsar+ssl://pulsar.us-west.example.com:6651
-
 ```
 
 ## Client 
diff --git a/site2/docs/client-libraries-node.md b/site2/docs/client-libraries-node.md
index f67c46b390a..ab2df8a6331 100644
--- a/site2/docs/client-libraries-node.md
+++ b/site2/docs/client-libraries-node.md
@@ -47,30 +47,25 @@ Also, this library works only in Node.js 10.x or later because it uses the [`nod
 :::
 
 ## Connection URLs
+
 To connect to Pulsar using client libraries, you need to specify a [Pulsar protocol](developing-binary-protocol.md) URL.
 
-Pulsar protocol URLs are assigned to specific clusters, use the `pulsar` scheme and have a default port of 6650. Here is an example for `localhost`:
+You can assign Pulsar protocol URLs to specific clusters and use the `pulsar` scheme. The following is an example of `localhost` with the default port `6650`:
 
 ```http
-
 pulsar://localhost:6650
-
 ```
 
-A URL for a production Pulsar cluster may look something like this:
+If you have multiple brokers, separate `IP:port` by commas:
 
 ```http
-
-pulsar://pulsar.us-west.example.com:6650
-
+pulsar://localhost:6550,localhost:6651,localhost:6652
 ```
 
-If you are using [TLS encryption](security-tls-transport.md) or [TLS Authentication](security-tls-authentication.md), the URL looks like this:
+If you use [TLS](security-tls-authentication.md) authentication, add `+ssl` in the scheme:
 
 ```http
-
 pulsar+ssl://pulsar.us-west.example.com:6651
-
 ```
 
 ## Create a client
diff --git a/site2/docs/client-libraries-python.md b/site2/docs/client-libraries-python.md
index e5b11345de2..bbfd91625f4 100644
--- a/site2/docs/client-libraries-python.md
+++ b/site2/docs/client-libraries-python.md
@@ -25,9 +25,7 @@ You can install the [`pulsar-client`](https://pypi.python.org/pypi/pulsar-client
 To install the `pulsar-client` library as a pre-built package using the [pip](https://pip.pypa.io/en/stable/) package manager:
 
 ```shell
-
 $ pip install pulsar-client==@pulsar:version_number@
-
 ```
 
 ### Optional dependencies
@@ -64,6 +62,28 @@ $ cd pulsar/pulsar-client-cpp/python
 $ sudo python setup.py install
 ```
 
+## Connection URLs
+
+To connect to Pulsar using client libraries, you need to specify a [Pulsar protocol](developing-binary-protocol.md) URL.
+
+You can assign Pulsar protocol URLs to specific clusters and use the `pulsar` scheme. The following is an example of `localhost` with the default port `6650`:
+
+```http
+pulsar://localhost:6650
+```
+
+If you have multiple brokers, separate `IP:port` by commas:
+
+```http
+pulsar://localhost:6550,localhost:6651,localhost:6652
+```
+
+If you use [TLS](security-tls-authentication.md) authentication, add `+ssl` in the scheme:
+
+```http
+pulsar+ssl://pulsar.us-west.example.com:6651
+```
+
 ## API Reference
 
 The complete Python API reference is available at [api/python](/api/python).