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/17 09:08:50 UTC

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

vongosling 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_r325058853
 
 

 ##########
 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:
   scheduledExecutorService is a global SingleThreadScheduledExecutor, how do we make sure that we have a reasonable schedule, and that if the schedule fails, it really doesn't affect the other logic?

----------------------------------------------------------------
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