duhenglucky commented on issue #3480:
URL: https://github.com/apache/rocketmq/issues/3480#issuecomment-971116631


   > i want to know whether two ip is the same in docker overlay mode of two 
machines
   
   Under HOST networking mode, all dockers managed by Rancher are with the same 
docker0 IP, which is 172.17.0.1. Thus, RemotingUtil.getLocalAddress() always 
returns "172.17.0.1" for those dockers, which leads to a collision between 
consumers with the same PID, if using default "IP@pid" clientId.
   
   But it's recommended you bump up your client version to the lastest, because 
the instanceName change to a new one with nanoTime to prevent this collision:
   ` if (this.instanceName.equals("DEFAULT")) {
               this.instanceName = UtilAll.getPid() + "#" + System.nanoTime();
      }`
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to