camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Content based routing with InOut pattern and exclusive reply queue
Date Thu, 20 Jun 2013 10:52:28 GMT
Hi

The reply queue is NOT exclusive. You use it 2 times for route1 and
route2 in the content based router.


On Thu, Jun 20, 2013 at 12:26 PM, Tomas Potocky <tomas.potocky@hp.com> wrote:
> Hi folks,
> I've found some strange behaviour using content based routing in camel. Can
> someone tell me what's wrong with following setup and why I get
> PersistentQueueReplyManager:86 - Reply received for unknown correlationID
> for route2 when using Exclusive queue for replies? If I use temporary queues
> for replies everything works.
>
>     <bean id="amq"
> class="org.apache.activemq.camel.component.ActiveMQComponent">
>         <property name="brokerURL"
> value="vm://deBroker?marshal=false&amp;broker.persistent=false" />
>     </bean>
>     <camelContext id="camelContext"
> xmlns="http://camel.apache.org/schema/spring">
>         <route id="main">
>             <from uri="direct:start" />
>             <choice>
>                 <when>
>                     <simple>${property.route} == 'route1'</simple>
>                     <to
> uri="amq:queue:route1?replyTo=route_reply&amp;replyToType=Exclusive"
> pattern="InOut" />
>                 </when>
>                 <when>
>                     <simple>${property.route} == 'route2'</simple>
>                     <to
> uri="amq:queue:route2?replyTo=route_reply&amp;replyToType=Exclusive"
> pattern="InOut" />
>                 </when>
>             </choice>
>             <to uri="mock:result" />
>         </route>
>
>         <route id="route1">
>             <from uri="amq:queue:route1" />
>             <log message="received ${body}" />
>             <to uri="mock:result1" />
>         </route>
>         <route id="route2">
>             <from uri="amq:queue:route2" />
>             <log message="received ${body}" />
>             <to uri="mock:result2" />
>         </route>
>     </camelContext>
>
> I'm producing following to start endpoint:
>         producer.sendBodyAndProperty("route1 body", "route", "route1");
>         producer.sendBodyAndProperty("route2 body", "route", "route2");
>
> Thanks
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Content-based-routing-with-InOut-pattern-and-exclusive-reply-queue-tp5734427.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
www.camelone.org: The open source integration conference.

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

Mime
View raw message