-
Notifications
You must be signed in to change notification settings - Fork 11.5k
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 #5069] polish the startup of proxy; can specify parameters on the command line of proxy #5083
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #5083 +/- ##
=============================================
+ Coverage 43.19% 43.28% +0.08%
- Complexity 7767 7791 +24
=============================================
Files 995 996 +1
Lines 69170 69225 +55
Branches 9154 9159 +5
=============================================
+ Hits 29879 29963 +84
+ Misses 35538 35498 -40
- Partials 3753 3764 +11
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
linked #5069 |
@@ -44,7 +45,7 @@ public class ProxyConfig implements ConfigFile { | |||
private long printJstackInMillis = Duration.ofSeconds(60).toMillis(); | |||
private long printThreadPoolStatusInMillis = Duration.ofSeconds(3).toMillis(); | |||
|
|||
private String nameSrvAddr = ""; | |||
private String nameSrvAddr = System.getProperty(MixAll.NAMESRV_ADDR_PROPERTY, System.getenv(MixAll.NAMESRV_ADDR_ENV)); |
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.
rename nameSrvAddr to namesrvAddr, match the config in brokeConfig.
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.
done
…rs on the command line of proxy
9eb8978
to
138d48f
Compare
"}"; | ||
Files.write(configFilePath, configData.getBytes(StandardCharsets.UTF_8)); | ||
|
||
CommandLineArgument commandLineArgument = ProxyStartup.parseCommandLineArgument(new String[] { |
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.
Add a case to make sure it works with "-bc xx/broker.conf" arguments
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.
LGTM now.
…the command line of proxy (#5083) undefined
Make sure set the target branch to
develop
What is the purpose of the change
Nowadays, proxy can only be configured by configuration file, it is not convenient to use.
Brief changelog
Proxy can config these parameters on the command line
-n
--namesrvAddr
, the nameserver addr-pc
--proxyConfigPath
, the path of proxy config file-pm
--proxyMode
, proxy run in local or cluster mode-bc
--brokerConfigPath
, the path of broker config file when proxy run in local modeMeanwhile, we can start local mode proxy with mqbroker like
sh bin/mqbroker -n 127.0.0.1:9876 -c /path/to/broker.properties --enable-proxy
, and shutdown bysh bin/mqshutdown broker
Verifying this change
XXXX
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.