camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zuff <bhtan1...@live.com>
Subject Re: Polling Consumer and a Producer
Date Sun, 21 Oct 2012 18:33:54 GMT
Hi Christian,

>From various examples I seen, most of the route looks like


.
<camelContext xmlns="http://camel.apache.org/schema/spring"> 
<route> 
  <from uri="direct:start"/> 
<aggregate strategyRef="aggregatorStrategy" completionTimeout="3000"> 
<correlationExpression> 
<simple>header.id</simple> 
</correlationExpression> 
<to uri="mock:aggregated"/> 
</aggregate> 
</route>
 
As I very new to camel I'm not sure whether I interpret this correctly:
This route is quite standalone without any relation to the other route.


I need to link the first route to the second route.as I need to use the
jmsreplyto 
 


But what I need is something like :
<route>
    <from uri="activemq:topic:request"/>    
<to uri="request:queue"/>   
 <to uri="direct:waitForQueue"/>   
</route>

<route>
<from uri="direct:waitForQueue"/>  
 <to uri="queueManager:queue?id={in.header.id}/>   [his portion will perform
a polling and return the result that matches the given id']    <aggregate
.................>         .....   
 </aggregate>
</route>

However my queueManager:queue is written as a polling consumer 
Therefore currently it only work if I do
<from uri="queueManager:queue">
Else I won't get the exchange generated by the receive() method 

Appreciate any advice.
Where did I go wrong or how to redesign my route so that I could link router
1 and route 2.
Able to use the polling consumer and the aggregate? 
If not, what else should I do? 
Thanks



--
View this message in context: http://camel.465427.n5.nabble.com/Polling-Consumer-and-a-Producer-tp5721274p5721349.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message