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 c2b5074c07d [feature][doc]  add examples for creates a Python Client 
use a listener_name (#15386)
c2b5074c07d is described below

commit c2b5074c07d13ca4f256f0c9c176ed85eb569568
Author: Dezhi LIiu <[email protected]>
AuthorDate: Thu May 5 20:53:52 2022 +0800

    [feature][doc]  add examples for creates a Python Client use a 
listener_name (#15386)
---
 site2/docs/client-libraries-python.md | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/site2/docs/client-libraries-python.md 
b/site2/docs/client-libraries-python.md
index 245fc70b38a..d502be27454 100644
--- a/site2/docs/client-libraries-python.md
+++ b/site2/docs/client-libraries-python.md
@@ -168,6 +168,17 @@ while True:
 client.close()
 ```
 
+### Create a Python client with multiple advertised listeners
+To ensure clients in both internal and external networks can connect to a 
Pulsar cluster, Pulsar introduces 
[advertisedListeners](concepts-multiple-advertised-listeners.md).
+
+The following example creates a Python client using multiple advertised 
listeners:
+
+```python
+import pulsar
+
+client = pulsar.Client('pulsar://localhost:6650', listener_name='external')
+```
+
 ## Schema
 
 ### Supported schema types

Reply via email to