3 Replies Latest reply on Dec 31, 2013 2:08 AM by xiang yingbing

    How do I configure stomp and stomp_ws in Wildfly?

    David Gudorf Newbie

      I am migrating from AS7 and am having trouble getting stomp and stomp_ws to work in Wildfly 8.0.0.beta1.  I have the following section in my standalone.xml file.

       

           <subsystem xmlns="urn:jboss:domain:messaging:1.4">

                  <hornetq-server>

                      <persistence-enabled>false</persistence-enabled>

                      <journal-type>NIO</journal-type>

                      <journal-file-size>102400</journal-file-size>

                      <journal-min-files>2</journal-min-files>

       

       

                      <connectors>

                          <netty-connector name="netty" socket-binding="messaging"/>

                          <netty-connector name="netty-throughput" socket-binding="messaging-throughput">

                              <param key="batch-delay" value="50"/>

                          </netty-connector>

                          <in-vm-connector name="in-vm" server-id="0"/>

                      </connectors>

       

                      <acceptors>

                          <netty-acceptor name="netty" socket-binding="messaging"/>

                          <netty-acceptor name="netty-throughput" socket-binding="messaging-throughput">

                              <param key="batch-delay" value="50"/>

                              <param key="direct-deliver" value="false"/>

                          </netty-acceptor>

                          <in-vm-acceptor name="in-vm" server-id="0"/>

                          <acceptor name="stomp-websocket">

                              <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>

                              <param key="host" value="0.0.0.0"/>

                              <param key="protocol" value="stomp_ws"/>

                              <param key="port" value="61614"/>

                          </acceptor>

                          <acceptor name="stomp-acceptor">

                              <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>

                              <param key="protocol" value="stomp"/>

                              <param key="port" value="61613"/>

                          </acceptor>

                      </acceptors>

       

       

                      <security-settings>

                          <security-setting match="#">

                              <permission type="send" roles="guest"/>

                              <permission type="consume" roles="guest"/>

                              <permission type="createNonDurableQueue" roles="guest"/>

                              <permission type="deleteNonDurableQueue" roles="guest"/>

                          </security-setting>

                      </security-settings>

       

                      <address-settings>

                          <address-setting match="#">

                              <dead-letter-address>jms.queue.DLQ</dead-letter-address>

                              <expiry-address>jms.queue.ExpiryQueue</expiry-address>

                              <redelivery-delay>0</redelivery-delay>

                              <max-size-bytes>10485760</max-size-bytes>

                              <address-full-policy>BLOCK</address-full-policy>

                              <message-counter-history-day-limit>10</message-counter-history-day-limit>

                          </address-setting>

                      </address-settings>

       

                      <jms-connection-factories>

                          <connection-factory name="InVmConnectionFactory">

                              <connectors>

                                  <connector-ref connector-name="in-vm"/>

                              </connectors>

                              <entries>

                                  <entry name="java:/ConnectionFactory"/>

                              </entries>

                          </connection-factory>

                          <connection-factory name="RemoteConnectionFactory">

                              <connectors>

                                  <connector-ref connector-name="netty"/>

                              </connectors>

                              <entries>

                                  <entry name="RemoteConnectionFactory"/>

                              </entries>

                          </connection-factory>

                          <pooled-connection-factory name="hornetq-ra">

                              <transaction mode="xa"/>

                              <connectors>

                                  <connector-ref connector-name="in-vm"/>

                              </connectors>

                              <entries>

                                  <entry name="java:/JmsXA"/>

                              </entries>

                          </pooled-connection-factory>

                      </jms-connection-factories>

       

       

                      <jms-destinations>

                          <jms-queue name="testQueue">

                              <entry name="queue/test"/>

                          </jms-queue>

                          <jms-topic name="testTopic">

                              <entry name="topic/test"/>

                          </jms-topic>

                      </jms-destinations>

                  </hornetq-server>

              </subsystem>

       

      However, when Wildfly starts, I get the following errors:

       

      Q222080: Error instantiating remoting acceptor org.hornetq.core.remoting.impl.netty.Netty.NettyAcceptorFactory: HornetQException[errorType=GENERIC_EXCEPTION message=HQ119085: Classpath lacks a protocol-manager for protocol stomp]

              at org.hornetq.core.remoting.server.impl.RemotingServiceImpl.start(RemotingServiceImpl.java:251) [hornetq-server-2.4.0.Beta2.jar:]

              at org.hornetq.core.server.impl.HornetQServerImpl.initialisePart2(HornetQServerImpl.java:1649) [hornetq-server-2.4.0.Beta2.jar:]

              at org.hornetq.core.server.impl.HornetQServerImpl.access$1400(HornetQServerImpl.java:171) [hornetq-server-2.4.0.Beta2.jar:]

              at org.hornetq.core.server.impl.HornetQServerImpl$SharedNothingLiveActivation.run(HornetQServerImpl.java:2640) [hornetq-server-2.4.0.Beta2.jar:]

              at org.hornetq.core.server.impl.HornetQServerImpl.start(HornetQServerImpl.java:429) [hornetq-server-2.4.0.Beta2.jar:]

              at org.hornetq.jms.server.impl.JMSServerManagerImpl.start(JMSServerManagerImpl.java:483) [hornetq-jms-server-2.4.0.Beta2.jar:]

              at org.jboss.as.messaging.jms.JMSService.doStart(JMSService.java:155) [wildfly-messaging-8.0.0.Beta1.jar:8.0.0.Beta1]

              at org.jboss.as.messaging.jms.JMSService.access$000(JMSService.java:61)[wildfly-messaging-8.0.0.Beta1.jar:8.0.0.Beta1]

              at org.jboss.as.messaging.jms.JMSService$1.run(JMSService.java:95) [wildfly-messaging-8.0.0.Beta1.jar:8.0.0.Beta1]

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_25]

              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_25]

              at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_25]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]

              at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]

              at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final.jar:2.1.1.Final]

       

       

      15:21:29,910 WARN  [org.hornetq.core.server] (ServerService Thread Pool -- 54) HQ222080: Error instantiating remoting acceptor org.hornetq.core.remoting.impl.ne

      tty.NettyAcceptorFactory: HornetQException[errorType=GENERIC_EXCEPTION message=HQ119085: Classpath lacks a protocol-manager for protocol stomp_ws]

              at org.hornetq.core.remoting.server.impl.RemotingServiceImpl.start(RemotingServiceImpl.java:251) [hornetq-server-2.4.0.Beta2.jar:]

              at org.hornetq.core.server.impl.HornetQServerImpl.initialisePart2(HornetQServerImpl.java:1649) [hornetq-server-2.4.0.Beta2.jar:]

              at org.hornetq.core.server.impl.HornetQServerImpl.access$1400(HornetQServerImpl.java:171) [hornetq-server-2.4.0.Beta2.jar:]

              at org.hornetq.core.server.impl.HornetQServerImpl$SharedNothingLiveActivation.run(HornetQServerImpl.java:2640) [hornetq-server-2.4.0.Beta2.jar:]

              at org.hornetq.core.server.impl.HornetQServerImpl.start(HornetQServerImpl.java:429) [hornetq-server-2.4.0.Beta2.jar:]

              at org.hornetq.jms.server.impl.JMSServerManagerImpl.start(JMSServerManagerImpl.java:483) [hornetq-jms-server-2.4.0.Beta2.jar:]

              at org.jboss.as.messaging.jms.JMSService.doStart(JMSService.java:155) [wildfly-messaging-8.0.0.Beta1.jar:8.0.0.Beta1]

              at org.jboss.as.messaging.jms.JMSService.access$000(JMSService.java:61)[wildfly-messaging-8.0.0.Beta1.jar:8.0.0.Beta1]

              at org.jboss.as.messaging.jms.JMSService$1.run(JMSService.java:95) [wildfly-messaging-8.0.0.Beta1.jar:8.0.0.Beta1]

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_25]

              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_25]

              at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_25]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]

              at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]

              at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final.jar:2.1.1.Final]