camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Force Camel wait all route execution
Date Wed, 07 Jan 2009 09:47:15 GMT
2009/1/7 Willem Jiang <willem.jiang@gmail.com>:
> I think Camel already supports it if your routes elements are alway
> instace of OutputType.

You meant InOut there right? i.e. if the messaging is request-response
http://activemq.apache.org/camel/request-reply.html


> <camelContext id="camel"
> xmlns="http://activemq.apache.org/camel/schema/spring">
>    <route>
>      <from uri="direct:start"/>
>      <to uri="some endpoint1"/>
>      <to uri="some endpoint2"/>
>      <to uri="some endpoint3"/>
>    </route>
>  </camelContext>
>
> Camel will use a pipeline to chain these endpoints up, if the message
> exchange pattern is InOut, you will get the response which is produced
> by the "some endpont3" from "direct:A".
>
> But if your routes configured like this, I don't think camel support this.
>
> <camelContext id="camel"
> xmlns="http://activemq.apache.org/camel/schema/spring">
>    <route>
>      <from uri="direct:start"/>
>      <to uri="queue:mid"/>
>    </route>
>    <route>
>      <from uri="queue:mid"/>
>      ... some slow endpoint
>    </route>
>  </camelContext>
>
> Willem
>
>
> mta38 wrote:
>> Hi all,
>>
>> Is a way exist when use a DirectEndpoint to force camel wait execution of
>> all routes before send response back to first endpoint ?
>>
>> For example if I have the following routes
>>
>> <camelContext id="camel" ..>
>>       <from uri="direct:A">
>>       <to uri="">
>>       …
>>       N routes
>>
>> </camelContext>
>>
>> Want camel execute the N routes before send response back to "direct:A".
>> Best regards,
>> Mta38
>>
>
>



-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/

Mime
View raw message