Connecting a local active MQ to a remote IBM MQ

I am new to active MQ.

I have a requirement to create a local Active MQ and connect it to a remote IBM MQ.

Can anyone help me on how to connect to a distributed queue and queue manager.

+3


source to share


1 answer


You can use Apache Camel to connect between two providers. Routes can be started from the broker, pulled from the ActiveMQ queue and clicked on the WMQ queue (or vice versa). The concept is almost similar to the concept of a channel in WMQ, which pulls transmissions from the queue and pushes them to the appropriate destination in the remote queue manager.

Assuming you are using WMQ V7 + for all QMgrs and clients, this is just a matter of learning how to set up a route and set up connections. Older versions of WMQ and you might have to figure out how to handle RFH2 headers for native WMQ clients if they are consumers.

The simplest route set up in spring would look like this:



<route id="amq-to-wmq" >
  <from uri="amq:YOUR.QUEUE" />
  <to uri="wmq:YOUR.QUEUE" />
</route>

      

"wmq" and "amq" will point to beans where JMS components are configured. Here you have to set up connection factories for each provider and how clients behave (for example, transactions or not), so I will stop here to give an example.

This will go into camel.xml (or whatever you call it) and imported from your broker XML. ActiveMQ comes with several examples you can use to get started using Camel JMS components. Just take a look at the default camel.xml file that comes with the normal installation.

+2


source







All Articles