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 2019/09/20 06:48:08 UTC

[GitHub] [rocketmq] wqliang commented on a change in pull request #1458: [ISSUE #1457] Dynamically effective namesrvAddr for name server auto-scaling

wqliang commented on a change in pull request #1458: [ISSUE #1457] Dynamically effective namesrvAddr for name server auto-scaling
URL: https://github.com/apache/rocketmq/pull/1458#discussion_r326491742
 
 

 ##########
 File path: broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java
 ##########
 @@ -388,6 +388,20 @@ public void run() {
                 }
             }, 1000 * 10, 1000 * 60, TimeUnit.MILLISECONDS);
 
+            if (this.brokerConfig.isWatchNamesrvAddr()) {
+                this.scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
+
+                    @Override
+                    public void run() {
+                        try {
+                            BrokerController.this.brokerOuterAPI.updateNameServerAddressList(brokerConfig.getNamesrvAddr());
 
 Review comment:
   Should it be under consideration that` fetchNamesrvAddrByAddressServer` is true when you configure atchNamesrvAddr to true and update the `namesrvAddr` as you mentioned ? Maybe this two configurations are contradictory.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services