How to get local ActiveMQ broker to "mirror" a queue on a remote ActiveMQ broker?

Posted by T.K. on Stack Overflow See other posts from Stack Overflow or by T.K.
Published on 2010-02-01T12:55:45Z Indexed on 2010/03/28 13:43 UTC
Read the original article Hit count: 383

Filed under:
|
|

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:

  1. A new message appears in the remote ActiveMQ broker. The message is put into a specific queue.
  2. In a few minutes, the Internet connection becomes available to the local ActiveMQ broker.
  3. The local broker should then be able to pull the message from the remote broker, and place it in its own local queue.
  4. 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.

© Stack Overflow or respective owner

Related posts about activemq

Related posts about java