3 Replies Latest reply on Apr 11, 2016 11:41 AM by jbertram

    Accessing Wildfly 10 Artemis broker from external Java apps

    corruptedbuffer

      We have some legacy standalone Java applications that use the ActiveMQ API to do pub/sub.  Can those standalone apps publish messages through the Artemis broker within Wildfly 10 (i.e. we want those standalone apps to publish to MDBs in Wildfly)?  If that's possible, would the broker URL be simply tcp://localhost:61616?

       

      Thanks.

        • 1. Re: Accessing Wildfly 10 Artemis broker from external Java apps
          jbertram

          One of Artemis' goals is to support the OpenWire protocol (which is what ActiveMQ 5.x uses "natively").  Support for OpenWire in Artemis 1.2.0 is decent, but not great.  A lot of work has been done in this area recently and will be available when 1.3.0 is released.  If you're client is pretty simple (i.e. just a basic producer) then I think there's a good chance that 1.2.0 will support it.

          • 2. Re: Accessing Wildfly 10 Artemis broker from external Java apps
            corruptedbuffer

            Thanks for the reply.  So I tried publishing to tcp://localhost:61616 from the legacy ActiveMQ app, but I get a "Connection refused":

             

            javax.jms.JMSException: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused

             

            Is the Artemis broker on that port, or is that broker simply not available outside of Wildfly?

            • 3. Re: Accessing Wildfly 10 Artemis broker from external Java apps
              jbertram

              You'll need to explicitly set up the acceptor on 61616, e.g.:

               

                  </profile>
                      ...
                      <subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0">
                          <server name="default">
                              ...
                              <remote-acceptor name="activemq-5x-acceptor" socket-binding="activemq-5x"/>
                              ...
                          </server>
                      </subsystem>
                      ...
                  </profile>
                  <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
                      ...
                      <socket-binding name="activemq-5x" port="61616"/>
                      ...
                  </socket-binding-group>