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 5b15d7953c89f4a9b2b401c86482b5bdc82d77e2..f613894d66fde78ce65014d30f41e1d7c19981de 100644 --- a/broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java +++ b/broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java @@ -234,7 +234,7 @@ public class BrokerStartup { if (properties == null) { return; } - String rmqAddressServerDomain = properties.getProperty("rmqAddressServerDomain", "jmenv.tbsite.net"); + String rmqAddressServerDomain = properties.getProperty("rmqAddressServerDomain", MixAll.DEFAULT_NAMESRV_ADDR_LOOKUP); String rmqAddressServerSubGroup = properties.getProperty("rmqAddressServerSubGroup", "nsaddr"); System.setProperty("rocketmq.namesrv.domain", rmqAddressServerDomain); System.setProperty("rocketmq.namesrv.domain.subgroup", rmqAddressServerSubGroup); diff --git a/common/src/main/java/org/apache/rocketmq/common/MixAll.java b/common/src/main/java/org/apache/rocketmq/common/MixAll.java index 22ed96ac3c324178fd89e08098cff9da0cf032bf..cbb395a0cc8032f57b8bc9a91e89c2b7793b9ccc 100644 --- a/common/src/main/java/org/apache/rocketmq/common/MixAll.java +++ b/common/src/main/java/org/apache/rocketmq/common/MixAll.java @@ -52,7 +52,8 @@ public class MixAll { public static final String NAMESRV_ADDR_ENV = "NAMESRV_ADDR"; public static final String NAMESRV_ADDR_PROPERTY = "rocketmq.namesrv.addr"; public static final String MESSAGE_COMPRESS_LEVEL = "rocketmq.message.compressLevel"; - public static final String WS_DOMAIN_NAME = System.getProperty("rocketmq.namesrv.domain", "jmenv.tbsite.net"); + public static final String DEFAULT_NAMESRV_ADDR_LOOKUP = "jmenv.tbsite.net"; + public static final String WS_DOMAIN_NAME = System.getProperty("rocketmq.namesrv.domain", DEFAULT_NAMESRV_ADDR_LOOKUP); public static final String WS_DOMAIN_SUBGROUP = System.getProperty("rocketmq.namesrv.domain.subgroup", "nsaddr"); // http://jmenv.tbsite.net:8080/rocketmq/nsaddr public static final String WS_ADDR = "http://" + WS_DOMAIN_NAME + ":8080/rocketmq/" + WS_DOMAIN_SUBGROUP;