when you setup your "activemq" component (generally in spring xml), you have
to specify the broker to connect to.  this is generally localhost, but can
be an external broker, etc.  So, just setup multiple activemq components
(and give them an appropriate ID)...like this

   <bean id="activemq_production" 
      class="org.apache.activemq.camel.component.ActiveMQComponent">
      <property name="brokerURL" value="tcp://production-host:61616"/>
   </bean>

   <bean id="activemq_customer" 
      class="org.apache.activemq.camel.component.ActiveMQComponent">
      <property name="brokerURL" value="tcp://customer-host:61616"/>
   </bean>

   <bean id="activemq_staging" 
      class="org.apache.activemq.camel.component.ActiveMQComponent">
      <property name="brokerURL" value="tcp://staging-host:61616"/>
   </bean>

then, your route simply references these components/queues, etc...

from("activemq_production:queue:queue1”)
.to("activemq_staging:queue:queue2","activemq_customer:queue:customerQueue");



newbiee wrote:
> 
> I have just started learning CAMEL. There are some good basic examples to
> learn CAMEL. It seems that, using CAMEL, it is so simple to send a message
> from one queue to the other. For example he is one example:
> 
> from("activemq:queue1”)
> .to("activemq:queue2");
> 
> The above two lines will do the job. I have tested and it works. I want to
> apply this to real world scenario, I need help from experts how can I do
> this:
> 
> I have a queue say "queue1" defined in the production environment and I
> have "queue2" defined in the Staging environment. There is "customerQueue"
> defined in our customer's production environment. From
> "queue1" I want to send messages to  "queue2" and to "customerQueue". I
> can use EIP to send messages from "queue1"  to "queue2" and to
> "customerQueue" (more than one recipients). What I don't know is how to
> tell CAMEL where is  "queue2" and where is "customerQueue". Please help
> me.
> 


-----
Ben O'Day
IT Consultant -http://consulting-notes.com

--
View this message in context: 
http://camel.465427.n5.nabble.com/Sending-message-to-different-environment-tp4728380p4728626.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to