1 Reply Latest reply on Oct 16, 2017 1:37 AM by ro ko

    How to send JMS messages from WildFly 10 to a remote ActiveMQ

    Kristin Aanby Newbie

      Hi,

      I'm trying to setup a connection from our Wildfly (v10.1.0.Final) to a remote ActiveMQ service. Remotely we have ActiveMQ v5.3.

      My purpose is to send messages to the remote server (not receiving).

      I'm trying to connect using the bundled Artemis remote adapter as described here (step 1, 2 and 3): https://docs.jboss.org/author/display/WFLY10/Connect+a+pooled-connection-factory+to+a+Remote+Artemis+Server

       

      Below is the configuration from my standalone-full-ha.xml.

              <subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0">
                  <server name="default">
                      <cluster password="${jboss.messaging.cluster.password:CHANGE ME!!}"/>
                      <security-setting name="#">
                          <role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>
                      </security-setting>
                      <address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10" redistribution-delay="1000"/>
                      <http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>
                      <http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput">
                          <param name="batch-delay" value="50"/>
                      </http-connector>
                      <remote-connector name="remote-babel-amq" socket-binding="remote-babel-amq"/>
                      <in-vm-connector name="in-vm" server-id="0"/>
                      <http-acceptor name="http-acceptor" http-listener="default"/>
                      <http-acceptor name="http-acceptor-throughput" http-listener="default">
                          <param name="batch-delay" value="50"/>
                          <param name="direct-deliver" value="false"/>
                      </http-acceptor>
                      <in-vm-acceptor name="in-vm" server-id="0"/>
                      <broadcast-group name="bg-group1" jgroups-channel="activemq-cluster" connectors="http-connector"/>
                      <discovery-group name="dg-group1" jgroups-channel="activemq-cluster"/>
                      <cluster-connection name="my-cluster" address="jms" connector-name="http-connector" discovery-group="dg-group1"/>
                      <jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>
                      <jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
                      <jms-queue name="distribution_inbound" entries="java:jboss/jms/queue/distribution/inbound"/>
                      <connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>
                      <connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector" ha="true" block-on-acknowledge="true" reconnect-attempts="-1"/>
                      <connection-factory name="remote-babel-amq" entries="java:/jms/remoteBabelAmqCF" connectors="remote-babel-amq"/>
                      <pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/>
                  </server>
              </subsystem>
      
          <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
              <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
              <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
              <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
              <socket-binding name="http" port="${jboss.http.port:8080}"/>
              <socket-binding name="https" port="${jboss.https.port:8443}"/>
              <socket-binding name="iiop" interface="unsecure" port="3528"/>
              <socket-binding name="iiop-ssl" interface="unsecure" port="3529"/>
              <socket-binding name="jgroups-mping" interface="private" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>
              <socket-binding name="jgroups-tcp" interface="private" port="7600"/>
              <socket-binding name="jgroups-tcp-fd" interface="private" port="57600"/>
              <socket-binding name="jgroups-udp" interface="private" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
              <socket-binding name="jgroups-udp-fd" interface="private" port="54200"/>
              <socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>
              <socket-binding name="txn-recovery-environment" port="4712"/>
              <socket-binding name="txn-status-manager" port="4713"/>
              <outbound-socket-binding name="mail-smtp">
                  <remote-destination host="localhost" port="25"/>
              </outbound-socket-binding>
              <outbound-socket-binding name="remote-babel-amq">
                  <remote-destination host="zstjava01" port="61616"/>
              </outbound-socket-binding>
          </socket-binding-group>
      

       

      When I try to start the server, I get this error messages:

       

      10:06:53,585 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.messaging-activemq.default: org.jboss.msc.service.StartException in service jboss.messaging-activemq.default: WFLYMSGAMQ0033: Failed to start service

      [Server:wjnordic-server-one]        at org.wildfly.extension.messaging.activemq.ActiveMQServerService.start(ActiveMQServerService.java:308)

      [Server:wjnordic-server-one]        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)

      [Server:wjnordic-server-one]        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)

      [Server:wjnordic-server-one]        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

      [Server:wjnordic-server-one]        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

      [Server:wjnordic-server-one]        at java.lang.Thread.run(Thread.java:745)

      [Server:wjnordic-server-one] Caused by: org.jboss.msc.service.StartException in anonymous service: WFLYMSGAMQ0030: Failed to find SocketBinding for connector: remote-babel-amq

      [Server:wjnordic-server-one]        at org.wildfly.extension.messaging.activemq.ActiveMQServerService.start(ActiveMQServerService.java:194)

      [Server:wjnordic-server-one]        ... 5 more

       

      10:07:05,898 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
      [Server:wjnordic-server-one]     ("subsystem" => "messaging-activemq"),
      [Server:wjnordic-server-one]     ("server" => "default")
      [Server:wjnordic-server-one] ]) - failure description: {
      [Server:wjnordic-server-one]     "WFLYCTL0080: Failed services" => {"jboss.messaging-activemq.default" => "org.jboss.msc.service.StartException in service jboss.messaging-activemq.default: WFLYMSGAMQ0033: Failed to start service
      [Server:wjnordic-server-one]     Caused by: org.jboss.msc.service.StartException in anonymous service: WFLYMSGAMQ0030: Failed to find SocketBinding for connector: remote-babel-amq"},
      [Server:wjnordic-server-one]     "WFLYCTL0412: Required services that are not installed:" => ["jboss.messaging-activemq.default"],
      [Server:wjnordic-server-one]     "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
      [Server:wjnordic-server-one] }
       
       
      10:07:06,158 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started (with errors) in 20543ms - Started 720 of 1014 services (2 services failed or missing dependencies, 505 services are lazy, passive or on-demand)
       

       

      Can someone help me getting on the right track?

      Thanks!