File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,13 @@ bindAddress=0.0.0.0
3838# Hostname or IP address the service advertises to the outside world. If not set, the value of InetAddress.getLocalHost().getHostName() is used.
3939advertisedAddress=localhost
4040
41+ # Used to specify multiple advertised listeners for the broker.
42+ # The value must format as <listener_name>:pulsar://<host>:<port>,
43+ # multiple listeners should separate with commas.
44+ # Do not use this configuration with advertisedAddress and brokerServicePort.
45+ # The Default value is absent means use advertisedAddress and brokerServicePort.
46+ advertisedListeners=localhost6650:pulsar://localhost:6650,localhost6651:pulsar+ssl://localhost:6651,localhost8443:pulsar+ssl://localhost:8443
47+
4148# Name of the cluster to which this broker belongs to
4249clusterName=standalone
4350
Original file line number Diff line number Diff line change @@ -23,15 +23,16 @@ const Pulsar = require('../index');
2323( ( ) => {
2424 describe ( 'End To End' , ( ) => {
2525 test . each ( [
26- [ 'pulsar://localhost:6650' ] ,
27- [ 'pulsar+ssl://localhost:6651' ] ,
28- [ 'http://localhost:8080' ] ,
29- [ 'https://localhost:8443' ] ,
30- ] ) ( 'Produce/Consume to %s ' , async ( serviceUrl ) => {
26+ { serviceUrl : 'pulsar://localhost:6650' , listenerName : undefined } ,
27+ { serviceUrl : 'pulsar+ssl://localhost:6651' , listenerName : 'localhost6651' } ,
28+ { serviceUrl : 'http://localhost:8080' , listenerName : undefined } ,
29+ { serviceUrl : 'https://localhost:8443' , listenerName : 'localhost8443' } ,
30+ ] ) ( 'Produce/Consume to $serviceUrl ' , async ( { serviceUrl, listenerName } ) => {
3131 const client = new Pulsar . Client ( {
3232 serviceUrl,
3333 tlsTrustCertsFilePath : `${ __dirname } /certificate/server.crt` ,
3434 operationTimeoutSeconds : 30 ,
35+ listenerName,
3536 } ) ;
3637
3738 const topic = 'persistent://public/default/produce-consume' ;
You can’t perform that action at this time.
0 commit comments