-
Notifications
You must be signed in to change notification settings - Fork 900
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
[ISSUE #8] Offer a more user-friendly format to configure nameserver #171
base: master
Are you sure you want to change the base?
Conversation
} else { | ||
nameServerToString = nameServer.get(0); | ||
if (nameServerToString.contains(";")) { | ||
log.warn("name-server format `host:port;host:port` is deprecated."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have a recommendation for a newer style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO that logic shows a separate property is warranted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think changing the cardinality of the current property is a good idea. I've added a suggestion.
*/ | ||
private String nameServer; | ||
private List<String> nameServer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name seems a bit odd for a collections. Have you considered naming that servers
? If you want to retain backward compatibility, you could deprecate this one with a replacement metadata to servers
and then apply the old logic if nameServer
is set. If both are set, I would throw an exception.
You could then remove nameServer
in the next feature release.
} else { | ||
nameServerToString = nameServer.get(0); | ||
if (nameServerToString.contains(";")) { | ||
log.warn("name-server format `host:port;host:port` is deprecated."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO that logic shows a separate property is warranted.
I will close this PR. Considering the habit of rocketmq users, I think separate namesever with semicolons is still a good choice. |
@RongtongJin I am confused. This issue is closed in |
@snicoll, I apologize for not replying you sooner, I missed your message since I closed this pull request. I think this is a historical problem. Rocketmq users have used the |
Great, let's hear more from the community. |
What is the purpose of the change
User can config name-server with format
host:port,host:port
or other list formats and ensure backward compatibility.ref #8
Brief changelog
Change the injection type from string to List.
Verifying this change
Follow this checklist to help us incorporate your contribution quickly and easily. Notice,
it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR
.[ISSUE #123] Fix UnknownException when host config not exist
. Each commit in the pull request should have a meaningful subject line and body.mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle
to make sure basic checks pass. Runmvn clean install -DskipITs
to make sure unit-test pass. Runmvn clean test-compile failsafe:integration-test
to make sure integration-test pass.