title: Distributed ActiveMQ with Camel
body: <p>I am in the process of learning ActiveMQ and Camel, with the goal to create a little prototype system that works something like this:</p>
  
  <p><a href="https://i.stack.imgur.com/wpoYj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wpoYj.png" alt="alt text"></a><br>
  <sub>(source: <a href="http://www.paulstovell.com/get/stackoverflow-questions/Queues.png" rel="nofollow noreferrer">paulstovell.com</a>)</sub>  </p>
  
  <p><a href="http://www.paulstovell.com/get/stackoverflow-questions/Queues.png" rel="nofollow noreferrer">(big)</a></p>
  
  <p>When an order is placed in the Orders system, a message is sent out to any subscribers (a pub/sub system), and they can play their part in processing the order. The <em>Orders</em>, <em>Shipping</em> and <em>Invoicing</em> applications have their own ActiveMQ installations, so that if any of the three systems are offline, the others can continue to function. <em>Something</em> takes care of moving messages between the ActiveMQ installs. </p>
  
  <p>Getting Apache Camel to move messages from one queue to another via routes is quite easy, if they are on the same ActiveMQ instance. So this works for managing the subscription queues. </p>
  
  <p>The next challenge is pushing messages from one ActiveMQ instance to another, and it's the bit where I am not sure what to look at next. </p>
  
  <ol>
  <li>Can Camel route between different ActiveMQ installations? (I can't figure out what the JMI endpoint URI would be if they are on different machines). </li>
  <li>I understand ActiveMQ has <a href="http://activemq.apache.org/how-do-distributed-queues-work.html" rel="nofollow noreferrer">store and forward</a> capabilities. Is this what I would use to move messages between Orders and Shipping/Invoicing?</li>
  <li>Or is this what <a href="http://servicemix.apache.org/home.html" rel="nofollow noreferrer">Apache ServiceMix</a> is meant to solve?</li>
  </ol>