Cczzzz commented on a change in pull request #1801: add client custom 
nameserver TopAddressing
URL: https://github.com/apache/rocketmq/pull/1801#discussion_r385172242
 
 

 ##########
 File path: 
client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java
 ##########
 @@ -212,20 +213,25 @@ public RemotingClient getRemotingClient() {
     public String fetchNameServerAddr() {
         try {
             String addrs = this.topAddressing.fetchNSAddr();
-            if (addrs != null) {
-                if (!addrs.equals(this.nameSrvAddr)) {
-                    log.info("name server address changed, old=" + 
this.nameSrvAddr + ", new=" + addrs);
-                    this.updateNameServerAddressList(addrs);
-                    this.nameSrvAddr = addrs;
-                    return nameSrvAddr;
-                }
-            }
+            return fetchNameServerAddr(addrs);
         } catch (Exception e) {
             log.error("fetchNameServerAddr Exception", e);
         }
         return nameSrvAddr;
     }
 
+    public String fetchNameServerAddr(String addrs){
 
 Review comment:
   I'm going to split up the method so it's easy to call

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to