You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/07/25 08:49:54 UTC

[GitHub] [rocketmq] zhangjidi2016 commented on a change in pull request #3174: [ISSUE #3173]Isolate Broker logs when multiple Broker services are deployed on the same machine.

zhangjidi2016 commented on a change in pull request #3174:
URL: https://github.com/apache/rocketmq/pull/3174#discussion_r676110608



##########
File path: broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java
##########
@@ -187,6 +187,7 @@ public static BrokerController createBrokerController(String[] args) {
             JoranConfigurator configurator = new JoranConfigurator();
             configurator.setContext(lc);
             lc.reset();
+            System.setProperty("brokerLogDir", brokerConfig.getBrokerName() + "_" + brokerConfig.getBrokerId());

Review comment:
       > i
   > 
   > > In dleger mode, The broker id changes when the leader change. so if we restart the leader you will see broker id change from zero to non-zero
   > 
   > I think brokerport can be used
   
   If brokers are deployed in Dledger mode, use dLegerSelfId instead of brokerId




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org