On Tue, Aug 3, 2010 at 3:59 PM, Marco Crivellaro
<[email protected]> wrote:
>
> Hi all,
> we have a route which is delivering of a given message to a list of
> endpoints (HTTP, MAIL, FTP, JMS)
> to achieve this we are using a recipentList (the endpoint list is dinamic)
> once the delivery to a given endpoint is processed we need to update a
> delivery trail through a web service, to achieve this we have introduced an
> aggregationStrategy
>
> this is the route (simplified):
>
> from("direct:start")
>   .recipientList(header("recipientListHeader").tokenize(","))
>   .parallelProcessing().executorService(customThreadPoolExecutor)
>   .aggregationStrategy(new
> RecipientAggregationStrategy()).to("direct:completed")
>
>
> a list of new endpoint is processed as soon as the current one is not
> completed, the problem is one of the endpoints might lag for a long time and
> therefore the route gets stuck.
> is there a way to set a timeout so that if not all endpoints are processed
> after 30 secs the route runs in timeout and it starts processing the next?
> --

Timeout is usually something you may be able to configure on the
various components. For example a http client, cxf client, jms client
etc.
But in fact I have previously thought of having timeout support in the
inner pieces of Camel which handles the recipient list EIP and other
EIPs.

I have created a ticket to track this
https://issues.apache.org/activemq/browse/CAMEL-3023

The issue is however to handle the situation when the response *do
come back*, to ignore the late reply. And if possible cancel the
future task.


> View this message in context: 
> http://camel.465427.n5.nabble.com/recipientList-aggregationStrategy-timeout-tp2262937p2262937.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to