You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2021/02/25 15:19:12 UTC

[activemq-artemis] 01/03: ARTEMIS-3138 Shared Nothing Live broker shouldn't try to connect to itself

This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git

commit 03a8e20de210127d81d7fb7b0200fa67b42a74ec
Author: franz1981 <ni...@gmail.com>
AuthorDate: Wed Feb 24 12:34:36 2021 +0100

    ARTEMIS-3138 Shared Nothing Live broker shouldn't try to connect to itself
---
 .../activemq/artemis/core/server/cluster/ClusterController.java      | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterController.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterController.java
index f6b32de..6322db7 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterController.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterController.java
@@ -198,6 +198,11 @@ public class ClusterController implements ActiveMQComponent {
       //this is used for replication so need to use the server packet decoder
       serverLocator.setProtocolManagerFactory(ActiveMQServerSideProtocolManagerFactory.getInstance(serverLocator, server.getStorageManager()));
       serverLocator.setThreadPools(server.getThreadPool(), server.getScheduledPool());
+      SimpleString nodeID = server.getNodeID();
+      if (nodeID != null) {
+         // this is used to allow a live server to ignore it's same connector ref
+         serverLocator.setNodeID(nodeID.toString());
+      }
       try {
          serverLocator.initialize();
       } catch (Exception e) {