title: Apache Camel with ActiveMQ clustering
body: <p>I'm trying to determine my options for clustering my ServiceMix 3.3.1/Camel 2.1/AMQ 5.3 application.  I'm performing high volume message processing and I need to cluster for high availability and horizontal scalability.</p>
  
  <p>Here is basically what my application does...HTTP->QUEUE->PROCESS->DATABASE->TOPIC</p>
  
  <p>from("jetty:<a href="http://0.0.0.0/inbound" rel="noreferrer">http://0.0.0.0/inbound</a>")
  .to("activemq:inboundQueue");</p>
  
  <p>from("activemq:inboundQueue?maxConcurrentConsumers=50")
  .process(decode())
  .process(transform())
  .process(validate())
  .process(saveToDatabase())
  .to("activemq:topic:ouboundTopic");</p>
  
  <p>So, I've read all the ServiceMix and AcitveMQ clustering pages, but am still not sure which way to go.  </p>
  
  <p>I know I can use a Master/Slave setup for HA, but that doesn't help with scalability.</p>
  
  <p>I've read about network of brokers, but am not sure how this applies.  For example, if I deploy identical Camel routes on multiple nodes in a cluster, how will they "interact" exactly?  If I point my HTTP producer at one node (NodeA), which messages will get sent to NodeB?  Will the queues/topics be shared between Node A/B...if so how, are messages split or duplicated?  Also, how would an external client subscribe to my "outboundTopic" exactly (and get all messages, etc)?</p>
  
  <p>Alternatively, I've been thinking that I should just share a broker between multiple ServiceMix instances.  That would be cleaner in that there would only be one set of queues/topics to manage and I could scale by adding more instances.  But, now I'm limited to the scalability of a single broker and I'm back to a single point of failure...</p>
  
  <p>If anyone can clarify the trade-offs for me...I'd appreciate it. </p>