title: Spring configuration for multiple Activemq remote brokers
body: <p>How to configure multiple remote activemq brokers (different IP address) in spring context? Below is the configuration for 1 remote broker. I am using camel to create routes that produce and consume messages from and to different queues in multiple remote brokers. Based on the following routes, how do the system knows which remote broker each queue belongs to? </p>
  
  <ul>
  <li><p>List item</p>
  
  <p>from("direct:start").to("activemq:queue:outgoingRequests")</p></li>
  <li><p>List item</p>
  
  <p>from("activemq:queue:incomingOrders").to("log:Events?
  showAll=true").to("bean:jmsService")</p></li>
  </ul>
  
  <p>Spring context for 1 broker
      
           org.camel.routes
           
      </p>
  
  <pre><code>&lt;bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"&gt;
      &lt;property name="brokerURL" value="tcp://10.1.11.97:61616" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="pooledConnectionFactory"
      class="org.apache.activemq.pool.PooledConnectionFactory" init-
              method="start" destroy-method="stop"&gt;
      &lt;property name="maxConnections" value="8" /&gt;
      &lt;property name="connectionFactory" ref="jmsConnectionFactory" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="jmsConfig" class="org.apache.camel.component.jms.JmsConfiguration"&gt;
      &lt;property name="connectionFactory" ref="pooledConnectionFactory"/&gt;
      &lt;property name="concurrentConsumers" value="10"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent"&gt;
      &lt;property name="configuration" ref="jmsConfig"/&gt;
  &lt;/bean&gt;
  </code></pre>