This is an automated email from the ASF dual-hosted git repository.

jinrongtong pushed a commit to branch develop-1014
in repository https://gitbox.apache.org/repos/asf/rocketmq.git

commit a8777096e1ea077cfa366af2d3d3c79128fed395
Author: RongtongJin <[email protected]>
AuthorDate: Tue Oct 14 17:38:52 2025 +0800

    Fix the issue where the port is always 10911 when starting 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);

Reply via email to