title: Websockets / STOMP with ActiveMQ Artemis on Wildfly 10 not working
body: <p>I am implementing a WebSockets application using Spring WebSockets.</p>
  
  <p>As a STOMP broker, I want to use Wildfly's Artemis (Active MQ).</p>
  
  <p>I did the following configuration in standalone-full.xml:</p>
  
  <ul>
  <li><p>Adding the following acceptor:</p>
  
  <pre><code>&lt;acceptor name="stomp-acceptor"
      factory-class="org.apache.activemq.artemis.core.remoting.impl.netty.NettyAcceptorFactory"&gt;
      &lt;param name="protocols" value="STOMP" /&gt;
      &lt;param name="port" value="61613" /&gt;
  &lt;/acceptor&gt;
  </code></pre></li>
  <li><p>add a new application user guest/guest to application-users.properties using add-user.bat</p></li>
  <li><p>add the following StompConfiguration (abbreviated):</p>
  
  <pre><code>@Configuration
  @EnableWebSocketMessageBroker
  public class StompConfiguration extends AbstractWebSocketMessageBrokerConfigurer {
      @Override
      public void registerStompEndpoints(StompEndpointRegistry registry) {
          registry.addEndpoint("/ws").setAllowedOrigins("*").withSockJS();
      }
  
      @Override
      public void configureMessageBroker(MessageBrokerRegistry config) {
          config.setApplicationDestinationPrefixes("/app");
              config.enableStompBrokerRelay("/topic", "/queue").setRelayHost("localhost").setRelayPort(61613)
              .setClientLogin("guest").setClientPasscode("guest");
          }
      }
  </code></pre></li>
  </ul>
  
  <p>This seems to work well at startup:</p>
  
  <blockquote>
    <p>16:57:13,890 INFO  [org.apache.activemq.artemis.core.server]
    (ServerService Thread Pool -- 64) AMQ221020: Started Acceptor at
    localhost:61613 for protocols [STOMP] 16:57:13,892 INFO 
    [org.apache.activemq.artemis.core.server] (ServerService Thread Pool
    -- 64) AMQ221007: Server is now live</p>
  </blockquote>
  
  <p>However, wenn I send the first message using Spring's SimpMessagingTemplate:</p>
  
  <pre><code>template.convertAndSend(topic, payload);
  </code></pre>
  
  <p>I get the error</p>
  
  <blockquote>
    <p>ERROR
    [org.springframework.messaging.simp.stomp.StompBrokerRelayMessageHandler]
    (reactor-tcp-io-1) Received ERROR {message=[AMQ339001: Destination
    does not exist: /topic/abc/12345/xyz]}
    session=<em>system</em></p>
  </blockquote>
  
  <p>Using Stomp, it should not be necessary to create a topic beforehand. How can I tell Artemis to create it automatically?</p>