vancefantasy edited a comment on issue #667: Consumer rebalance problem when using docker container URL: https://github.com/apache/rocketmq/issues/667#issuecomment-453735825 @huanwei clientId: public String buildMQClientId() { StringBuilder sb = new StringBuilder(); sb.append(this.getClientIP()); sb.append("@"); sb.append(this.getInstanceName()); if (!UtilAll.isBlank(this.unitName)) { sb.append("@"); sb.append(this.unitName); } return sb.toString(); } instanceName: private String instanceName = System.getProperty("rocketmq.client.name", "DEFAULT"); public void changeInstanceNameToPID() { if (this.instanceName.equals("DEFAULT")) { this.instanceName = String.valueOf(UtilAll.getPid()); } } 在docker环境下(使用host模式),获取到的clientIp和pid都是一样的。当然clientIp一样的确切原因还没完全确认,[可能和引入Rancher有关](https://github.com/rancher/rancher/issues/5499)。 <img width="154" alt="wx20190112-180557 2x" src="https://user-images.githubusercontent.com/42924205/51071992-c48c2300-1694-11e9-8b4b-c949f446e0a5.png"> https://github.com/apache/rocketmq/pull/668
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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
