How to get local ActiveMQ broker to "mirror" a queue on a remote ActiveMQ broker?
- by T.K.
I have a local ActiveMQ broker which is on an unreliable internet connection, and also a remote ActiveMQ broker in a reliable datacenter. I have already sorted out a "store and forward" setup so that outgoing messages are sent to the remote broker when the Internet connection is available. That alone works great, but when messages are outbound.
However, now I have to do the reverse. Here is the scenario:
A new message appears in the remote ActiveMQ broker. The message is put into a specific queue.
In a few minutes, the Internet connection becomes available to the local ActiveMQ broker.
The local broker should then be able to pull the message from the remote broker, and place it in its own local queue.
Local consumers will then be able to see the message.
So in essence, I need the local broker to become a subscribed consumer to the remote queue. I have looked through the ActiveMQ documentations but I can't find anything yet about how to do this in the .xml configuration file.
Is this what I should be looking for? See: "ActiveMQ: JMS to JMS Bridge".
Any advice and tips would be highly appreciated.