This is an automated email from the ASF dual-hosted git repository.
duhengforever pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push:
new 44736c3 fix Multiple instances in the same application share
MQClientInstance
new 735ecaa Merge pull request #2731 from panzhi33/develop
44736c3 is described below
commit 44736c3760b9caa0aad21b8df7a3e53bebfd07b8
Author: panzhi33 <[email protected]>
AuthorDate: Tue Mar 16 12:21:32 2021 +0800
fix Multiple instances in the same application share MQClientInstance
---
client/src/main/java/org/apache/rocketmq/client/ClientConfig.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/src/main/java/org/apache/rocketmq/client/ClientConfig.java
b/client/src/main/java/org/apache/rocketmq/client/ClientConfig.java
index d0ae5e1..bcd3f9b 100644
--- a/client/src/main/java/org/apache/rocketmq/client/ClientConfig.java
+++ b/client/src/main/java/org/apache/rocketmq/client/ClientConfig.java
@@ -94,7 +94,7 @@ public class ClientConfig {
public void changeInstanceNameToPID() {
if (this.instanceName.equals("DEFAULT")) {
- this.instanceName = String.valueOf(UtilAll.getPid());
+ this.instanceName = UtilAll.getPid()+ "#" + System.nanoTime();
}
}