2
votes

I'm trying to set up a STOMP acceptor in my Wildfly 11 based Swarm deployment (using Swarm 2017.12.1 to generate a fat WAR, running via java -jar...), for letting clients send me progress messages, but could not get the acceptor to load, always get this error at server startup:

AMQ222203: Classpath lacks a protocol-manager for protocol STOMP, Protocol being ignored on acceptor TransportConfiguration(name=stomp-acceptor, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyAcceptorFactory) ?port=61613&protocols=STOMP

I am using an existing (but adapted) standalone-full.xml configuration to make the switch easier, and everything works fine so far (Java EE wise), but not the STOMP part (JMS works, though).

I've included some dependencies in the WAR's POM to fix previous class loading errors, but now I run out of ideas:

<dependency>
  <groupid>org.apache.activemq</groupid>
  <artifactid>activemq-rar</artifactid>
  <version>5.15.2</version>
  <type>rar</type>
</dependency>
<dependency>
  <groupid>org.apache.activemq</groupid>
  <artifactid>activemq-stomp</artifactid>
  <version>5.15.2</version>
</dependency>
<dependency>
  <groupid>io.netty</groupid>
  <artifactid>netty-all</artifactid>
  <version>4.1.5.Final</version>
</dependency>

(so I'm relying on Swarm to figure out needed fragments, which works for the rest)

My configuration for the messaging part looks like this:

<acceptor name="stomp-acceptor" factory-class="org.apache.activemq.artemis.core.remoting.impl.netty.NettyAcceptorFactory">
    <param name="protocols" value="STOMP"/>
    <!--param name="connection-ttl" value="30000"/-->
    <param name="host" value="${jboss.bind.address:127.0.0.1}"/>
    <param name="port" value="61613"/>
    <!--param name="stomp-enable-message-id" value="true"/-->
</acceptor>

I've searched Swarm, Artemis and also SO but didn't find a working solution. Could it be that Wildfly 11 will not work since it's using Artemis 1.5 and Swarm does not yet fully support it?

some resources I found useful so far:

1

1 Answers

-1
votes

A friendly and helpful chat on #wildfly-swarm brought an explanation and possible solution, but we'll have to wait for the bugfix, see https://issues.jboss.org/browse/SWARM-1763

Ken Finnigan found out the root cause in an error in the modules configuration for messaging in Wildfly:

The issue is a result of the org.apache.activemq.artemis module.xml defining protocol modules for STOMP, AMQP and HornetQ as optional, so WF Swarm does not pick them up.