4 Replies Latest reply on May 20, 2016 1:52 PM by Rob Terpilowski

    Migrating from a Standalone ActiveMQ broker to ActiveMQ/Artemis in Wildfly 10.

    Rob Terpilowski Newbie

      We currently have an ActiveMQ 5.x stand alone message broker which a number of applications connect to that are hosted on our Glassfish and Wildfly servers.  We are investigating the feasibility of migrating these applications to use the ActiveMQ/Artemis implementation that is embedded in Wildfly 10.   All of our applications are connecting to the broker remotely using the camel activemq component.  The first thing I am trying to determine, is what is the easiest way to get one of these clients to connect to a broker running on Wildfly 10.  It looks like OpenWire is not included with Wildfly out of the box, so I'm not sure if it would be easier to attempt to install it, and if so, how? Or, if it would be easier to try update our clients to use the Camel jms component to connect, although this would be more of a headache as every app would need to be updated to use the jms rather than activemq component.

       

      Any thoughts appreciated.

       

      Thanks,

      -Rob

        • 1. Re: Migrating from a Standalone ActiveMQ broker to ActiveMQ/Artemis in Wildfly 10.
          Miroslav Novak Master

          I did some tries but I could not find correct version of artemis-openwire-protocol...jar with which Wildfly 10 could start acceptor with openwire protocol.

           

          Maybe you'll have better luck. Those are my notes:

           

          mkdir -p ./modules/system/layers/base/org/apache/activemq/artemis/protocol/openwire/main 

          cd ./modules/system/layers/base/org/apache/activemq/artemis/protocol/openwire/main

          # Compile Artemis and copy correct jar from artemis-protocols/artemis-openwire-protocol/target/ to new module

          cp <artemis_project>/artemis-openwire-protocol-1.x.x...jar .

          vi module.xml # add there following - change name of the jar per your version

          --------------------------

          <?xml version="1.0" encoding="UTF-8"?>
          <module xmlns="urn:jboss:module:1.3" name="org.apache.activemq.artemis.protocol.openwire">
              <resources>
                  <resource-root path="artemis-openwire-protocol-1.x.x...jar"/>
              </resources>
          
              <dependencies>
                  <module name="javax.jms.api"/>
                  <!-- required to load ActiveMQ protocol SPI -->
                  <module name="org.apache.activemq.artemis"/>
              </dependencies>
          </module>
          
          

          --------------------------

          Modify module.xml for org.apache.activemq.artemis module and there as dependency org.apache.activemq.artemis.protocol.openwire:

          <module name="org.apache.activemq.artemis.protocol.openwire" services="import" optional="true"/>

           

          Create new socket binding and acceptor in standalone-full-ha.xml with openwire using CLI:

          #add socket binding for openwire acceptor on 61616

          /socket-binding-group=standard-sockets/socket-binding=openwire:add(port=61616)

          /subsystem=messaging-activemq/server=default/acceptor=openwire-acceptor:add(socket-binding=openwire,factory-class=org.apache.activemq.artemis.core.remoting.impl.netty.NettyAcceptorFactory,params={protocols="OPENWIRE"})

           

          Cross your fingers and start!

          • 2. Re: Migrating from a Standalone ActiveMQ broker to ActiveMQ/Artemis in Wildfly 10.
            Rob Terpilowski Newbie

            Thanks for the reply Miroslav.  I guess it looks like at the current time this support isn't fully baked yet, so we'll likely stick with our stand-alone ActiveMQ server for the time being, and give the OpenWire support a chance to mature.

            • 3. Re: Migrating from a Standalone ActiveMQ broker to ActiveMQ/Artemis in Wildfly 10.
              Justin Bertram Master

              Couple of points...

              • Wildfly uses ActiveMQ Artemis pretty much exclusively as a JMS provider so connectors for other protocols (e.g. REST, STOMP, OpenWire, AMQP, etc.) are not provided by default.  Therefore, don't let the fact that OpenWire isn't configured by default necessarily make you think it's not fully baked.
              • That said, OpenWire support is not fully baked in ActiveMQ Artemis 1.2.  There's good support for basic stuff, but not a lot beyond that.  A lot of work has been done for 1.3 which should provide better performance and coverage when it is released (and when Wildfly integrates it).