You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by newbiee <m_...@hotmail.com> on 2012/12/13 13:08:35 UTC

routing messages to two environments

We are using IBM MQ in our PRODCUTION and QA environments. We need to route
messages being received in PRODUCTION environment to our QA environment too
for some testing.

The queue manager being used in PRODUCTION environment is different that the
one being used in QA environment. I will appreciate if somebody could
help/comment how can the messages be routed to our QA environment. 

Please note: we don't want to change the header information. It is important
that the header does not get amended in any way by CAMEL.


Thank you so much



--
View this message in context: http://camel.465427.n5.nabble.com/routing-messages-to-two-environments-tp5724030.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: routing messages to two environments

Posted by newbiee <m_...@hotmail.com>.
Thank you Claus ... thank you for the quick turnaround ... it really helps
.... you guys are great.





--
View this message in context: http://camel.465427.n5.nabble.com/routing-messages-to-two-environments-tp5724030p5724098.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: routing messages to two environments

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Dec 14, 2012 at 12:17 PM, newbiee <m_...@hotmail.com> wrote:
> Thank you Hadrian!
>
> The other part of my question is how to route messages to two different
> queues managed by two different queue managers. PRODUCTION environment has
> different queue manager than QA environment. How can I specify this in the
> xml since XML has only this (for example):
>
> <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
>       <property name="connectionFactory">
>         <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>           <property name="brokerURL" value="tcp://xxx.xx.x.x:xxxx" />
>         </bean>
>       </property>
>   </bean>
>

Hi

You can define 2 different jms components, one for PROD and another
for QA. The id can be anything you like, does not have to be "jms"

eg you can have

 <bean id="mqProd" class="org.apache.camel.component.jms.JmsComponent">
 ...
</bean>

<bean id="mqQA" class="org.apache.camel.component.jms.JmsComponent">
 ...
</bean>

>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/routing-messages-to-two-environments-tp5724030p5724081.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: routing messages to two environments

Posted by Babak Vahdat <ba...@swissonline.ch>.
Hi

Following the code snippet Claus has already provided there's also a
concrete example on the Camel codebase you could take a look at:

https://svn.apache.org/repos/asf/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/activemq/TwoEmbeddedActiveMQBrokersTest.java

Babak


newbiee wrote
> Thank you Hadrian!
> 
> The other part of my question is how to route messages to two different
> queues managed by two different queue managers. PRODUCTION environment has
> different queue manager than QA environment. How can I specify this in the
> xml since XML has only this (for example):
> <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
>       
> <property name="connectionFactory">
>         
> <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>           
> <property name="brokerURL" value="tcp://xxx.xx.x.x:xxxx" />
>         
> </bean>
>       
> </property>
>   
> </bean>





--
View this message in context: http://camel.465427.n5.nabble.com/routing-messages-to-two-environments-tp5724030p5724125.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: routing messages to two environments

Posted by newbiee <m_...@hotmail.com>.
Thank you Hadrian!

The other part of my question is how to route messages to two different
queues managed by two different queue managers. PRODUCTION environment has
different queue manager than QA environment. How can I specify this in the
xml since XML has only this (for example):

<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
      <property name="connectionFactory">
        <bean class="org.apache.activemq.ActiveMQConnectionFactory">
          <property name="brokerURL" value="tcp://xxx.xx.x.x:xxxx" />
        </bean>
      </property>
  </bean>       




--
View this message in context: http://camel.465427.n5.nabble.com/routing-messages-to-two-environments-tp5724030p5724081.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: routing messages to two environments

Posted by Hadrian Zbarcea <hz...@gmail.com>.
That's what a wiretap [1] is for. When you place a wire tap on the route 
at your spot of interest, you get an exact copy of the message to a 
another endpoint (which could be another route, a jms endpoint, log, 
etc, that's besides the point). That's where you place the logic of 
moving the message to your QA environment. You can of course couple it 
with filtering, cbr and other eips as needed.

Cheers,
Hadrian

[1] http://camel.apache.org/wire-tap.html

On 12/13/2012 07:08 AM, newbiee wrote:
> We are using IBM MQ in our PRODCUTION and QA environments. We need to route
> messages being received in PRODUCTION environment to our QA environment too
> for some testing.
>
> The queue manager being used in PRODUCTION environment is different that the
> one being used in QA environment. I will appreciate if somebody could
> help/comment how can the messages be routed to our QA environment.
>
> Please note: we don't want to change the header information. It is important
> that the header does not get amended in any way by CAMEL.
>
>
> Thank you so much
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/routing-messages-to-two-environments-tp5724030.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>