You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2016/11/11 19:23:41 UTC

[11/11] activemq-artemis git commit: Implement STOMP destination prefixes

Implement STOMP destination prefixes


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/a25a8c48
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/a25a8c48
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/a25a8c48

Branch: refs/heads/ARTEMIS-780
Commit: a25a8c4814c01c072e51cae52f0907a856deb5cd
Parents: 0371822
Author: jbertram <jb...@apache.com>
Authored: Fri Nov 11 13:12:38 2016 -0600
Committer: jbertram <jb...@apache.com>
Committed: Fri Nov 11 13:12:38 2016 -0600

----------------------------------------------------------------------
 .../remoting/impl/netty/TransportConstants.java |  10 ++
 .../core/protocol/stomp/StompConnection.java    |  36 ++++--
 .../stomp/VersionedStompFrameHandler.java       |  33 ++++-
 .../tests/integration/stomp/StompTest.java      | 126 ++++++++++++++++++-
 .../tests/integration/stomp/StompTestBase.java  |   1 +
 .../integration/stomp/v11/StompV11Test.java     |   2 +-
 6 files changed, 190 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a25a8c48/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
index dfa2ce2..2007a21 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
@@ -203,6 +203,14 @@ public class TransportConstants {
 
    public static final String STOMP_MIN_LARGE_MESSAGE_SIZE = "stomp-min-large-message-size";
 
+   public static final String STOMP_ANYCAST_PREFIX = "stompAnycastPrefix";
+
+   public static final String DEFAULT_STOMP_ANYCAST_PREFIX = "";
+
+   public static final String STOMP_MULTICAST_PREFIX = "stompMulticastPrefix";
+
+   public static final String DEFAULT_STOMP_MULTICAST_PREFIX = "";
+
    public static final String NETTY_CONNECT_TIMEOUT = "connect-timeout-millis";
 
    public static final int DEFAULT_NETTY_CONNECT_TIMEOUT = -1;
@@ -242,6 +250,8 @@ public class TransportConstants {
       allowableAcceptorKeys.add(TransportConstants.CLUSTER_CONNECTION);
       allowableAcceptorKeys.add(TransportConstants.STOMP_CONSUMERS_CREDIT);
       allowableAcceptorKeys.add(TransportConstants.STOMP_MIN_LARGE_MESSAGE_SIZE);
+      allowableAcceptorKeys.add(TransportConstants.STOMP_ANYCAST_PREFIX);
+      allowableAcceptorKeys.add(TransportConstants.STOMP_MULTICAST_PREFIX);
       allowableAcceptorKeys.add(TransportConstants.CONNECTION_TTL);
       allowableAcceptorKeys.add(TransportConstants.CONNECTION_TTL_MAX);
       allowableAcceptorKeys.add(TransportConstants.CONNECTION_TTL_MIN);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a25a8c48/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java
index b4ae1b5..a6eab6b 100644
--- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java
+++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java
@@ -86,6 +86,12 @@ public final class StompConnection implements RemotingConnection {
 
    private final boolean enableMessageID;
 
+   private final int minLargeMessageSize;
+
+   private final String anycastPrefix;
+
+   private final String multicastPrefix;
+
    private StompVersions version;
 
    private VersionedStompFrameHandler frameHandler;
@@ -97,8 +103,6 @@ public final class StompConnection implements RemotingConnection {
 
    private final Object sendLock = new Object();
 
-   private final int minLargeMessageSize;
-
    private final ScheduledExecutorService scheduledExecutorService;
 
    private final ExecutorFactory factory;
@@ -161,6 +165,8 @@ public final class StompConnection implements RemotingConnection {
 
       this.enableMessageID = ConfigurationHelper.getBooleanProperty(TransportConstants.STOMP_ENABLE_MESSAGE_ID, false, acceptorUsed.getConfiguration());
       this.minLargeMessageSize = ConfigurationHelper.getIntProperty(TransportConstants.STOMP_MIN_LARGE_MESSAGE_SIZE, ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, acceptorUsed.getConfiguration());
+      this.anycastPrefix = ConfigurationHelper.getStringProperty(TransportConstants.STOMP_ANYCAST_PREFIX, TransportConstants.DEFAULT_STOMP_ANYCAST_PREFIX, acceptorUsed.getConfiguration());
+      this.multicastPrefix = ConfigurationHelper.getStringProperty(TransportConstants.STOMP_MULTICAST_PREFIX, TransportConstants.DEFAULT_STOMP_MULTICAST_PREFIX, acceptorUsed.getConfiguration());
    }
 
    @Override
@@ -252,12 +258,14 @@ public final class StompConnection implements RemotingConnection {
 
    public void autoCreateDestinationIfPossible(String queue, AddressInfo.RoutingType routingType) throws ActiveMQStompException {
       try {
-         // TODO check here to see if auto-creation is enabled
-         if (routingType == null || routingType.equals(AddressInfo.RoutingType.MULTICAST)) {
-            manager.getServer().createOrUpdateAddressInfo(new AddressInfo(SimpleString.toSimpleString(queue)).setAutoCreated(true));
-         } else {
-            manager.getServer().createOrUpdateAddressInfo(new AddressInfo(SimpleString.toSimpleString(queue)).setRoutingType(AddressInfo.RoutingType.ANYCAST));
-            manager.getServer().createQueue(SimpleString.toSimpleString(queue), SimpleString.toSimpleString(queue), null, null, true, false, true);
+         if (manager.getServer().getAddressInfo(SimpleString.toSimpleString(queue)) == null) {
+            // TODO check here to see if auto-creation is enabled
+            if (routingType.equals(AddressInfo.RoutingType.MULTICAST)) {
+               manager.getServer().createOrUpdateAddressInfo(new AddressInfo(SimpleString.toSimpleString(queue)).setAutoCreated(true));
+            } else {
+               manager.getServer().createOrUpdateAddressInfo(new AddressInfo(SimpleString.toSimpleString(queue)).setRoutingType(AddressInfo.RoutingType.ANYCAST).setAutoCreated(true));
+               manager.getServer().createQueue(SimpleString.toSimpleString(queue), SimpleString.toSimpleString(queue), null, null, true, false, true);
+            }
          }
       } catch (ActiveMQQueueExistsException e) {
          // ignore
@@ -561,7 +569,7 @@ public final class StompConnection implements RemotingConnection {
       if (stompSession.isNoLocal()) {
          message.putStringProperty(CONNECTION_ID_PROP, getID().toString());
       }
-      if (enableMessageID()) {
+      if (isEnableMessageID()) {
          message.putStringProperty("amqMessageId", "STOMP" + message.getMessageID());
       }
       try {
@@ -712,7 +720,7 @@ public final class StompConnection implements RemotingConnection {
       return this.frameHandler;
    }
 
-   public boolean enableMessageID() {
+   public boolean isEnableMessageID() {
       return enableMessageID;
    }
 
@@ -720,6 +728,14 @@ public final class StompConnection implements RemotingConnection {
       return minLargeMessageSize;
    }
 
+   public String getAnycastPrefix() {
+      return anycastPrefix;
+   }
+
+   public String getMulticastPrefix() {
+      return multicastPrefix;
+   }
+
    public StompProtocolManager getManager() {
       return manager;
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a25a8c48/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/VersionedStompFrameHandler.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/VersionedStompFrameHandler.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/VersionedStompFrameHandler.java
index cd3103b..06af785 100644
--- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/VersionedStompFrameHandler.java
+++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/VersionedStompFrameHandler.java
@@ -168,9 +168,8 @@ public abstract class VersionedStompFrameHandler {
       StompFrame response = null;
       try {
          connection.validate();
-         String destination = frame.getHeader(Stomp.Headers.Send.DESTINATION);
-         String destinationType = frame.getHeader(Headers.Send.DESTINATION_TYPE);
-         AddressInfo.RoutingType routingType = destinationType == null ? null : AddressInfo.RoutingType.valueOf(destinationType);
+         String destination = getDestination(frame);
+         AddressInfo.RoutingType routingType = getRoutingType(frame.getHeader(Headers.Send.DESTINATION_TYPE), frame.getHeader(Headers.Send.DESTINATION));
          connection.autoCreateDestinationIfPossible(destination, routingType);
          connection.checkDestination(destination);
          String txID = frame.getHeader(Stomp.Headers.TRANSACTION);
@@ -238,7 +237,7 @@ public abstract class VersionedStompFrameHandler {
 
    public StompFrame onSubscribe(StompFrame request) {
       StompFrame response = null;
-      String destination = request.getHeader(Stomp.Headers.Subscribe.DESTINATION);
+      String destination = getDestination(request);
 
       String selector = request.getHeader(Stomp.Headers.Subscribe.SELECTOR);
       String ack = request.getHeader(Stomp.Headers.Subscribe.ACK_MODE);
@@ -247,8 +246,7 @@ public abstract class VersionedStompFrameHandler {
       if (durableSubscriptionName == null) {
          durableSubscriptionName = request.getHeader(Stomp.Headers.Subscribe.DURABLE_SUBSCRIPTION_NAME);
       }
-      String subscriptionType = request.getHeader(Headers.Subscribe.SUBSCRIPTION_TYPE);
-      AddressInfo.RoutingType routingType = subscriptionType == null ? null : AddressInfo.RoutingType.valueOf(subscriptionType);
+      AddressInfo.RoutingType routingType = getRoutingType(request.getHeader(Headers.Subscribe.SUBSCRIPTION_TYPE), request.getHeader(Headers.Subscribe.DESTINATION));
       boolean noLocal = false;
 
       if (request.hasHeader(Stomp.Headers.Subscribe.NO_LOCAL)) {
@@ -264,6 +262,17 @@ public abstract class VersionedStompFrameHandler {
       return response;
    }
 
+   public String getDestination(StompFrame request) {
+      String destination = request.getHeader(Headers.Subscribe.DESTINATION);
+      if (connection.getMulticastPrefix().length() > 0 && destination.startsWith(connection.getMulticastPrefix())) {
+         destination = destination.substring(connection.getMulticastPrefix().length());
+      } else if (connection.getAnycastPrefix().length() > 0 && destination.startsWith(connection.getAnycastPrefix())) {
+         destination = destination.substring(connection.getAnycastPrefix().length());
+      }
+
+      return destination;
+   }
+
    public StompFrame postprocess(StompFrame request) {
       StompFrame response = null;
       if (request.hasHeader(Stomp.Headers.RECEIPT_REQUESTED)) {
@@ -334,4 +343,16 @@ public abstract class VersionedStompFrameHandler {
       connection.destroy();
    }
 
+   private AddressInfo.RoutingType getRoutingType(String typeHeader, String destination) {
+      AddressInfo.RoutingType routingType = AddressInfo.RoutingType.ANYCAST; // default
+      if (typeHeader != null) {
+         routingType = AddressInfo.RoutingType.valueOf(typeHeader);
+      } else if (destination != null && !connection.getAnycastPrefix().equals(connection.getMulticastPrefix())) {
+         if (connection.getMulticastPrefix().length() > 0 && destination.startsWith(connection.getMulticastPrefix())) {
+            routingType = AddressInfo.RoutingType.MULTICAST;
+         }
+      }
+      return routingType;
+   }
+
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a25a8c48/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java
index 8e54b76..19e9ebe 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java
@@ -25,6 +25,7 @@ import javax.jms.MessageProducer;
 import javax.jms.TextMessage;
 import java.io.ByteArrayOutputStream;
 import java.nio.charset.StandardCharsets;
+import java.util.UUID;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 import java.util.regex.Matcher;
@@ -40,6 +41,7 @@ import org.apache.activemq.artemis.api.core.client.ServerLocator;
 import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
 import org.apache.activemq.artemis.core.postoffice.impl.LocalQueueBinding;
 import org.apache.activemq.artemis.core.protocol.stomp.Stomp;
+import org.apache.activemq.artemis.core.protocol.stomp.StompProtocolManagerFactory;
 import org.apache.activemq.artemis.core.server.Queue;
 import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl;
 import org.apache.activemq.artemis.core.server.impl.AddressInfo;
@@ -295,7 +297,7 @@ public class StompTest extends StompTestBase {
       conn.connect(defUser, defPass);
 
       // first send a message to ensure that sending to a non-existent topic won't throw an error
-      send(conn, getTopicPrefix() + nonExistentTopic, null, "Hello World", true);
+      send(conn, getTopicPrefix() + nonExistentTopic, null, "Hello World", true, AddressInfo.RoutingType.MULTICAST);
 
       // create a subscription on the topic and send/receive another message
       MessageConsumer consumer = session.createConsumer(ActiveMQJMSClient.createTopic(nonExistentTopic));
@@ -317,6 +319,7 @@ public class StompTest extends StompTestBase {
 
       // closing the consumer here should trigger auto-deletion of the subscription queue and address
       consumer.close();
+      Thread.sleep(200);
       assertNull(server.getActiveMQServer()
                        .getAddressInfo(new SimpleString(nonExistentTopic)));
    }
@@ -1248,4 +1251,125 @@ public class StompTest extends StompTestBase {
 
       conn.disconnect();
    }
+
+   @Test
+   public void testDotAnycastPrefixOnSend() throws Exception {
+      testPrefix("jms.queue.", AddressInfo.RoutingType.ANYCAST, true);
+   }
+
+   @Test
+   public void testDotMulticastPrefixOnSend() throws Exception {
+      testPrefix("jms.topic.", AddressInfo.RoutingType.MULTICAST, true);
+   }
+
+   @Test
+   public void testDotAnycastPrefixOnSubscribe() throws Exception {
+      testPrefix("jms.queue.", AddressInfo.RoutingType.ANYCAST, false);
+   }
+
+   @Test
+   public void testDotMulticastPrefixOnSubscribe() throws Exception {
+      testPrefix("jms.topic.", AddressInfo.RoutingType.MULTICAST, false);
+   }
+
+   @Test
+   public void testSlashAnycastPrefixOnSend() throws Exception {
+      testPrefix("/queue/", AddressInfo.RoutingType.ANYCAST, true);
+   }
+
+   @Test
+   public void testSlashMulticastPrefixOnSend() throws Exception {
+      testPrefix("/topic/", AddressInfo.RoutingType.MULTICAST, true);
+   }
+
+   @Test
+   public void testSlashAnycastPrefixOnSubscribe() throws Exception {
+      testPrefix("/queue/", AddressInfo.RoutingType.ANYCAST, false);
+   }
+
+   @Test
+   public void testSlashMulticastPrefixOnSubscribe() throws Exception {
+      testPrefix("/topic/", AddressInfo.RoutingType.MULTICAST, false);
+   }
+
+   public void testPrefix(final String prefix, final AddressInfo.RoutingType routingType, final boolean send) throws Exception {
+      int port = 61614;
+      final String ADDRESS = UUID.randomUUID().toString();
+      final String PREFIXED_ADDRESS = prefix + ADDRESS;
+      String param = routingType.toString();
+      String urlParam = "stomp" + param.substring(0, 1) + param.substring(1).toLowerCase() + "Prefix";
+      server.getActiveMQServer().getRemotingService().createAcceptor("test", "tcp://" + hostname + ":" + port + "?protocols=" + StompProtocolManagerFactory.STOMP_PROTOCOL_NAME + "&" + urlParam + "=" + prefix).start();
+      conn = StompClientConnectionFactory.createClientConnection("1.0", hostname, port);
+      conn.connect(defUser, defPass);
+
+      // since this queue doesn't exist the broker should create a new address using the routing type matching the prefix
+      if (send) {
+         send(conn, PREFIXED_ADDRESS, null, "Hello World", true);
+      } else {
+         String uuid = UUID.randomUUID().toString();
+
+         ClientStompFrame frame = conn.createFrame(Stomp.Commands.SUBSCRIBE)
+                                      .addHeader(Stomp.Headers.Subscribe.DESTINATION, PREFIXED_ADDRESS)
+                                      .addHeader(Stomp.Headers.RECEIPT_REQUESTED, uuid);
+
+         frame = conn.sendFrame(frame);
+
+         assertEquals(uuid, frame.getHeader(Stomp.Headers.Response.RECEIPT_ID));
+      }
+
+      AddressInfo addressInfo = server.getActiveMQServer().getAddressInfo(SimpleString.toSimpleString(ADDRESS));
+      assertNotNull("No address was created with the name " + ADDRESS, addressInfo);
+      assertEquals(AddressInfo.RoutingType.valueOf(param), addressInfo.getRoutingType());
+
+      conn.disconnect();
+   }
+
+   @Test
+   public void testDotPrefixedSendAndRecieveAnycast() throws Exception {
+      testPrefixedSendAndRecieve("jms.queue.", AddressInfo.RoutingType.ANYCAST);
+   }
+
+   @Test
+   public void testDotPrefixedSendAndRecieveMulticast() throws Exception {
+      testPrefixedSendAndRecieve("jms.topic.", AddressInfo.RoutingType.MULTICAST);
+   }
+
+   @Test
+   public void testSlashPrefixedSendAndRecieveAnycast() throws Exception {
+      testPrefixedSendAndRecieve("/queue/", AddressInfo.RoutingType.ANYCAST);
+   }
+
+   @Test
+   public void testSlashPrefixedSendAndRecieveMulticast() throws Exception {
+      testPrefixedSendAndRecieve("/topic/", AddressInfo.RoutingType.MULTICAST);
+   }
+
+   public void testPrefixedSendAndRecieve(final String prefix, AddressInfo.RoutingType routingType) throws Exception {
+      int port = 61614;
+      final String ADDRESS = UUID.randomUUID().toString();
+      final String PREFIXED_ADDRESS = prefix + ADDRESS;
+      String param = routingType.toString();
+      String urlParam = "stomp" + param.substring(0, 1) + param.substring(1).toLowerCase() + "Prefix";
+      server.getActiveMQServer().getRemotingService().createAcceptor("test", "tcp://" + hostname + ":" + port + "?protocols=" + StompProtocolManagerFactory.STOMP_PROTOCOL_NAME + "&" + urlParam + "=" + prefix).start();
+      conn = StompClientConnectionFactory.createClientConnection("1.0", hostname, port);
+      conn.connect(defUser, defPass);
+      String uuid = UUID.randomUUID().toString();
+
+      ClientStompFrame frame = conn.createFrame(Stomp.Commands.SUBSCRIBE)
+                                   .addHeader(Stomp.Headers.Subscribe.DESTINATION, PREFIXED_ADDRESS)
+                                   .addHeader(Stomp.Headers.RECEIPT_REQUESTED, uuid);
+
+      frame = conn.sendFrame(frame);
+      assertEquals(uuid, frame.getHeader(Stomp.Headers.Response.RECEIPT_ID));
+
+      send(conn, ADDRESS, null, "Hello World", true);
+
+      frame = conn.receiveFrame(10000);
+      Assert.assertNotNull("Should have received a message", frame);
+      Assert.assertEquals(Stomp.Responses.MESSAGE, frame.getCommand());
+      Assert.assertEquals(ADDRESS, frame.getHeader(Stomp.Headers.Send.DESTINATION));
+      Assert.assertEquals("Hello World", frame.getBody());
+
+      conn.disconnect();
+   }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a25a8c48/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestBase.java
index 3ccca7d..278d80e 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestBase.java
@@ -414,6 +414,7 @@ public abstract class StompTestBase extends ActiveMQTestBase {
                                           boolean receipt,
                                           boolean noLocal) throws IOException, InterruptedException {
       ClientStompFrame frame = conn.createFrame(Stomp.Commands.SUBSCRIBE)
+                                   .addHeader(Stomp.Headers.Subscribe.SUBSCRIPTION_TYPE, AddressInfo.RoutingType.MULTICAST.toString())
                                    .addHeader(Stomp.Headers.Subscribe.DESTINATION, getTopicPrefix() + getTopicName());
       if (subscriptionId != null) {
          frame.addHeader(Stomp.Headers.Subscribe.ID, subscriptionId);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a25a8c48/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v11/StompV11Test.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v11/StompV11Test.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v11/StompV11Test.java
index e8a6f25..7cb02a3 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v11/StompV11Test.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v11/StompV11Test.java
@@ -2129,7 +2129,6 @@ public class StompV11Test extends StompTestBase {
 
    @Test
    public void testSendMessageToNonExistentQueueWithoutAutoCreation() throws Exception {
-      // TODO fix this test by checking auto-create settings
       AddressSettings addressSettings = new AddressSettings();
       addressSettings.setAutoCreateJmsQueues(false);
       server.getActiveMQServer().getAddressSettingsRepository().addMatch("#", addressSettings);
@@ -2139,6 +2138,7 @@ public class StompV11Test extends StompTestBase {
 
       ClientStompFrame frame = send(conn, "NonExistentQueue" + uuid, null, "Hello World", true, AddressInfo.RoutingType.ANYCAST);
 
+      // TODO fix this test by checking auto-create settings
       assertTrue(frame.getCommand().equals(Stomp.Responses.ERROR));
       IntegrationTestLogger.LOGGER.info("message: " + frame.getHeader("message"));