You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ma...@apache.org on 2016/11/08 10:46:10 UTC
[1/2] activemq-artemis git commit: Add prefix to clustering snf q
Repository: activemq-artemis
Updated Branches:
refs/heads/ARTEMIS-780 c9b557dfd -> f72aec041
Add prefix to clustering snf q
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/f72aec04
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/f72aec04
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/f72aec04
Branch: refs/heads/ARTEMIS-780
Commit: f72aec041b80a6ce25db35dbb429d0ae837d5f49
Parents: b9e5264
Author: Martyn Taylor <mt...@redhat.com>
Authored: Tue Nov 8 10:21:32 2016 +0000
Committer: Martyn Taylor <mt...@redhat.com>
Committed: Tue Nov 8 10:21:40 2016 +0000
----------------------------------------------------------------------
.../artemis/core/server/cluster/impl/ClusterConnectionImpl.java | 2 +-
.../activemq/artemis/core/server/impl/ScaleDownHandler.java | 3 ++-
.../artemis/tests/integration/server/ScaleDown3NodeTest.java | 4 ++--
.../activemq/artemis/tests/integration/server/ScaleDownTest.java | 2 +-
4 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f72aec04/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java
index 7d35dde..5ee94f0 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java
@@ -708,7 +708,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn
// New node - create a new flow record
- final SimpleString queueName = new SimpleString("sf." + name + "." + nodeID);
+ final SimpleString queueName = new SimpleString(storeAndForwardPrefix + name + "." + nodeID);
Binding queueBinding = postOffice.getBinding(queueName);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f72aec04/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ScaleDownHandler.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ScaleDownHandler.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ScaleDownHandler.java
index 9c1e209..2c28676 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ScaleDownHandler.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ScaleDownHandler.java
@@ -128,7 +128,8 @@ public class ScaleDownHandler {
}
}
- if (address.toString().startsWith("sf.")) {
+ String sfPrefix = ((PostOfficeImpl) postOffice).getServer().getInternalNamingPrefix() + "sf.";
+ if (address.toString().startsWith(sfPrefix)) {
messageCount += scaleDownSNF(address, queues, producer);
} else {
messageCount += scaleDownRegularMessages(address, queues, session, producer);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f72aec04/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDown3NodeTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDown3NodeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDown3NodeTest.java
index be91bdd..d13e876 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDown3NodeTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDown3NodeTest.java
@@ -117,7 +117,7 @@ public class ScaleDown3NodeTest extends ClusterTestBase {
createQueue(2, addressName, queueName1, null, false, servers[2].getConfiguration().getClusterUser(), servers[2].getConfiguration().getClusterPassword());
// pause the SnF queue so that when the server tries to redistribute a message it won't actually go across the cluster bridge
- String snfAddress = "sf.cluster0." + servers[0].getNodeID().toString();
+ String snfAddress = servers[0].getInternalNamingPrefix() + "sf.cluster0." + servers[0].getNodeID().toString();
Queue snfQueue = ((LocalQueueBinding) servers[2].getPostOffice().getBinding(SimpleString.toSimpleString(snfAddress))).getQueue();
snfQueue.pause();
@@ -260,7 +260,7 @@ public class ScaleDown3NodeTest extends ClusterTestBase {
createQueue(2, addressName, queueName3, null, false, servers[2].getConfiguration().getClusterUser(), servers[2].getConfiguration().getClusterPassword());
// pause the SnF queue so that when the server tries to redistribute a message it won't actually go across the cluster bridge
- String snfAddress = "sf.cluster0." + servers[0].getNodeID().toString();
+ String snfAddress = servers[0].getInternalNamingPrefix() + "sf.cluster0." + servers[0].getNodeID().toString();
Queue snfQueue = ((LocalQueueBinding) servers[2].getPostOffice().getBinding(SimpleString.toSimpleString(snfAddress))).getQueue();
snfQueue.pause();
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f72aec04/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownTest.java
index d2c6fc2..cba3008 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownTest.java
@@ -163,7 +163,7 @@ public class ScaleDownTest extends ClusterTestBase {
for (Map.Entry<SimpleString, Binding> entry : servers[0].getPostOffice().getAllBindings().entrySet()) {
String temp = entry.getValue().getAddress().toString();
- if (temp.startsWith("sf.") && temp.endsWith(servers[1].getNodeID().toString())) {
+ if (temp.startsWith(servers[1].getInternalNamingPrefix() + "sf.") && temp.endsWith(servers[1].getNodeID().toString())) {
// we found the sf queue for the other node
// need to pause the sfQueue here
((LocalQueueBinding) entry.getValue()).getQueue().pause();
[2/2] activemq-artemis git commit: Allow empty/no address for cluster
connections
Posted by ma...@apache.org.
Allow empty/no address for cluster connections
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/b9e5264d
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/b9e5264d
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/b9e5264d
Branch: refs/heads/ARTEMIS-780
Commit: b9e5264d1f6bad6129041874d79ba6bc9a498d01
Parents: c9b557d
Author: Martyn Taylor <mt...@redhat.com>
Authored: Mon Nov 7 17:39:18 2016 +0000
Committer: Martyn Taylor <mt...@redhat.com>
Committed: Tue Nov 8 10:21:40 2016 +0000
----------------------------------------------------------------------
artemis-tools/src/test/resources/artemis-configuration.xsd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b9e5264d/artemis-tools/src/test/resources/artemis-configuration.xsd
----------------------------------------------------------------------
diff --git a/artemis-tools/src/test/resources/artemis-configuration.xsd b/artemis-tools/src/test/resources/artemis-configuration.xsd
index 4c3e068..e8b9161 100644
--- a/artemis-tools/src/test/resources/artemis-configuration.xsd
+++ b/artemis-tools/src/test/resources/artemis-configuration.xsd
@@ -1265,7 +1265,7 @@
<xsd:complexType name="cluster-connectionType">
<xsd:sequence>
- <xsd:element name="address" type="xsd:string" maxOccurs="1" minOccurs="1">
+ <xsd:element name="address" type="xsd:string" maxOccurs="1" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
name of the address this cluster connection applies to