This is an automated email from the ASF dual-hosted git repository.
jinrongtong pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push:
new 3dd4bfd4f8 [ISSUE #9756] Fix the issue where the port is always 10911
when starting broker with brokerStartup
3dd4bfd4f8 is described below
commit 3dd4bfd4f86f7235b7054798a718bb3666862369
Author: rongtong <[email protected]>
AuthorDate: Wed Oct 15 09:56:14 2025 +0800
[ISSUE #9756] Fix the issue where the port is always 10911 when starting
broker with brokerStartup
Change-Id: I0bbefa0a9d0079de6f3f4b9068b3ea586dbccfe0
---
broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java
b/broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java
index 881668616a..aa51754874 100644
--- a/broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java
+++ b/broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java
@@ -124,6 +124,10 @@ public class BrokerStartup {
NettyClientConfig nettyClientConfig = new NettyClientConfig();
MessageStoreConfig messageStoreConfig = new MessageStoreConfig();
AuthConfig authConfig = new AuthConfig();
+
+ nettyServerConfig.setListenPort(10911);
+ messageStoreConfig.setHaListenPort(0);
+
Properties properties = new Properties();
if (StringUtils.isNotBlank(filePath)) {
systemConfigFileHelper.setFile(filePath);
@@ -161,9 +165,6 @@ public class BrokerStartup {
AuthConfig authConfig = configContext.getAuthConfig();
Properties properties = configContext.getProperties();
- nettyServerConfig.setListenPort(10911);
- configContext.getMessageStoreConfig().setHaListenPort(0);
-
if (null == brokerConfig.getRocketmqHome()) {
System.out.printf("Please set the %s variable in your environment
" +
"to match the location of the RocketMQ installation",
MixAll.ROCKETMQ_HOME_ENV);