Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix java doc for MultipleListenerValidator #12389

Merged
merged 2 commits into from
Oct 18, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ public final class MultipleListenerValidator {

/**
* Validate the configuration of `advertisedListeners`, `internalListenerName`.
* 2. the listener name in `advertisedListeners` must not duplicate.
* 3. user can not assign same 'host:port' to different listener.
* 4. if `internalListenerName` is absent, the first `listener` in the `advertisedListeners` will be the `internalListenerName`.
* 5. if pulsar do not specify `brokerServicePortTls`, should only contain one entry of `pulsar://` per listener name.
* 1. the listener name in `advertisedListeners` must not duplicate.
* 2. user can not assign same 'host:port' to different listener.
* 3. if `internalListenerName` is absent, the first `listener` in the `advertisedListeners` will be the `internalListenerName`.
* 4. if pulsar do not specify `brokerServicePortTls`, should only contain one entry of `pulsar://` per listener name.
Copy link
Contributor

@EronWright EronWright Oct 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that (4) is obsolete.

May I suggest:

  1. advertisedListeners consists of a comma-separated list of endpoints.
  2. Each endpoint consists of a listener name and an associated address (listener:scheme://host:port).
  3. A listener name may be repeated to define both a non-TLS and a TLS endpoint.
  4. Duplicate definitions are disallowed.
  5. If internalListenerName is absent, set it to the first listener defined in advertisedListeners.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for not updating the content of the document. Thanks @EronWright for your suggestion. I fixed it. PTAL. Thanks.

* @param config the pulsar broker configure.
* @return
*/
Expand Down