From 03a8e20de210127d81d7fb7b0200fa67b42a74ec Mon Sep 17 00:00:00 2001 From: franz1981 Date: Wed, 24 Feb 2021 12:34:36 +0100 Subject: [PATCH] ARTEMIS-3138 Shared Nothing Live broker shouldn't try to connect to itself --- .../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 f6b32def0b..6322db7e7a 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) {