2 Replies Latest reply on Jun 15, 2016 12:20 PM by tarun_bansal04

    Remote JMSConnection Factory

    tarun_bansal04

      Hello,

       

      I am trying to connect to ActiveMQ using a connectionFactory defined on a remote JBOSS instance. My application will be running on JBOSS1 deployed on Server1 but connection factory has been defined on JBOSS2 running on Server2. Is there a way I can put messages from Jboss1 application to Jboss2 activeMQ queue.

       

      Why we need this?

      The server on which application is running is not enabled to connect to MQ server, only Server2 is allowed to connect to MQ server.

       

       

      My application is created Switchyard and for local activeMQ we use JMS binding reference/service.

       

      Please advise.

        • 1. Re: Remote JMSConnection Factory
          igarashitm

          3 options:

          1. Deploy ResourceAdapter on local server which is configured to connect to the remote ActiveMQ server. Easier.
          2. Lookup ConnectionFactory from remote JNDI - possible if that ActiveMQ server exposes it outside the VM. Create a named CDI producer for the ConnectionFactory like "@Produces @Named("remoteConnectionFactory")" and look it up from remote JNDI server in the producer method.
          3. Enable ActiveMQ on local server as well and build a cluster with remote server.

           

          You may want to ask in ActiveMQ community for more details.

          • 2. Re: Remote JMSConnection Factory
            tarun_bansal04

            Thanks so much for the response.

             

            We ended up with another option- creating a JMS bridge between 2 different flavors of MQ.(AMQ-WMQ). It is working very nicely till now.