Hi You can also use JMS message groups http://activemq.apache.org/how-do-message-groups-compare-to-selectors.html http://activemq.apache.org/message-groups.html
Then the producer can set the group id, and make sure there is only one active, and the same, consumer for each unique group. On Wed, Sep 12, 2012 at 7:18 PM, garrydias <garryd...@gmail.com> wrote: > Dear friends > > I´m facing the folowing problem: I have 2 producers systems sending messages > to 1 jms queue that is consumed by 2 consumers systems. Ignore the VM where > they are. > > #a) a producerSystem_1.war has the folowing camelContext: > > <camelContext id="producerSystem-1-camelContext"> > ... > <route> > <from uri="direct:whatever" /> > <to uri="activemq:common_queue" /> > </route> > ... > </camelContext > > > > #b) a producerSystem_2.war has the folowing camelContext: > > <camelContext id="producerSystem-2-camelContext"> > ... > <route> > <from uri="direct:whatever" /> > <to uri="activemq:common_queue" /> > </route> > ... > </camelContext > > > > #c) a consumerSystem_1.war has the folowing camelContext: > > <camelContext id="context_1"> > <route> > <from uri="activemq:common_queue" /> > <to uri="bean:consumer_a" /> > </route> > </camelContext > > > > #d) a consumerSystem_2.war has the folowing camelContext: > > <camelContext id="context_2"> > <route> > <from uri="activemq:common_queue" /> > <to uri="bean:consumer_b" /> > </route> > </camelContext > > > > The VM where these applications are running is not important. > > My *desired behavior *is: > - Messages produced in #a must consumed in c# > - Messages produced in #b must consumed in d# > > The *actual behavior* is: > - Messages produced in #a sometimes is consumed in c# and sometimes in d# > - Messages produced in #b sometimes is consumed in c# and sometimes in d# > > I understand that JMS endpoints were designed to execute in the *actual > behavior*. But in this case, I need to run *my desired *behavior. > > There´s a way to do this using correlationIds (not send/receive approach)? > > Thanx a lot > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Using-correlationid-to-isolate-jms-queues-in-multiple-camelContexts-tp5719202.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen