EronWright opened a new pull request #12056:
URL: https://github.com/apache/pulsar/pull/12056
Master Issue: #12040
### Motivation
Add a new configuration setting `bindAddresses` to open additional server
ports on the broker. Note that these are in addition to `brokerServicePort` /
`brokerServicePortTls` for compatibility reasons.
Each new-style bind address is associated with an advertised listener, to be
used as the default listener for topic lookup requests. See #12040 for
details. A given listener may be associated with numerous bindings.
The scheme indicates the protocol handler and whether to use TLS on the
server channel. This PR is focused on the Pulsar protocol handler, but it is
anticipated that other protocols may be supported in future.
For example:
```
bindAddresses=external:pulsar://0.0.0.0:6652,external:pulsar+ssl://0.0.0.0:6653
bindAddress=0.0.0.0
brokerServicePort=6650
brokerServicePortTls=6651
advertisedListeners=cluster:pulsar://broker-1.local:6650,cluster:pulsar+ssl://broker-1.local:6651,external:pulsar://broker-1.example.dev:6652,external:pulsar+ssl://broker-1.example.dev:6653
internalListenerName=cluster
```
The above would produce three server sockets, with `6650` having no
associated listener name (thus retaining existing lookup behavior of returning
the internal listener), and with `6652` and `6653` having an association with
listener name `external`. Given a lookup request on `6652` or `6653`, the
`external` listener address would be returned.
### Modifications
- added configuration property `bindAddresses`
- implementing parsing and validation logic
- factored some utility code for formatting broker/web addresses
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
- [ ] Adhoc testing as outlined in PIP 95.
This change added tests and can be verified as follows:
- Added unit tests for configuration validation logic.
### Does this pull request potentially affect one of the following parts:
*If `yes` was chosen, please highlight the changes*
- Dependencies (does it add or upgrade a dependency): no
- The public API: no
- The schema: no
- The default values of configurations: no
- The wire protocol: no
- The rest endpoints: no
- The admin cli options: no
- Anything that affects deployment: no
### Documentation
Check the box below and label this PR (if you have committer privilege).
Need to update docs?
- [X] doc-required
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]