diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java index ac207982b2..11c98ad766 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java @@ -56,6 +56,12 @@ public interface QueueControl { @Attribute(desc = "whether this queue is durable") boolean isDurable(); + /** + * The routing type of this queue. + */ + @Attribute(desc = "The routing type of this queue") + byte getRoutingType() throws Exception; + /** * Returns the filter associated with this queue. */ diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java index c5f2111422..f96556198e 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java @@ -175,6 +175,19 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override + public byte getRoutingType() throws Exception { + checkStarted(); + + clearIO(); + try { + return queue.getRoutingType().getType(); + } finally { + blockOnIO(); + } + + } + @Override public boolean isTemporary() { checkStarted(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java index a389d6518d..e96b5cb2b7 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java @@ -171,6 +171,11 @@ public class QueueControlUsingCoreTest extends QueueControlTest { return (Boolean) proxy.retrieveAttributeValue("durable"); } + @Override + public byte getRoutingType() throws Exception { + return (byte) proxy.retrieveAttributeValue("routingType"); + } + @Override public boolean isTemporary() { return (Boolean) proxy.retrieveAttributeValue("temporary");