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: recipientList + parallelProcessing + aggregationStrategy
Date Tue, 27 Jul 2010 16:22:02 GMT
On Tue, Jul 27, 2010 at 6:18 PM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
> On Tue, Jul 27, 2010 at 6:13 PM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
>> On Tue, Jul 27, 2010 at 5:43 PM, Marco Crivellaro
>> <mcrive@optasportsdata.com> wrote:
>>>
>>> Hi all,
>>> we have a route which is delivering of a given message to a list of
>>> endpoints (HTTP, MAIL, FTP...)
>>> to achieve this we are using a recipentList (the endpoint list is dinamic).
>>> In order to process all deliveries in parallel we are using
>>> parallelProcessing
>>>
>>> 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
>>>
>>> so far so good... this is the route (simplified):
>>>
>>> from("direct:start")
>>>   .recipientList(header("recipientListHeader").tokenize(","))
>>>   .parallelProcessing().executorService(customThreadPoolExecutor)
>>>   .aggregationStrategy(new
>>> RecipientAggregationStrategy()).to("direct:completed")
>>>
>>>
>>> the issue we have is that the exchanges starts to hit the
>>> aggregationStrategy once all of them have been processed so if one of them
>>> takes a long time we cannot update our delivery information trail and
>>> therefore we do not know if they've been already updated.
>>> is there a way to process the exchanges at aggregationStrategy as soon as
>>> they reach the endpoint?
>>>
>>
>> No
>
> Ah sorry you can use streaming() mode and it should invoke the
> aggregation strategy in the order they are completed.
> The non stream (default) is to invoke in the order they are defined.
> So when the first is finished its invoked, then wait for 2nd, and so
> on.
>
> Maybe we haven't exposes this option so you can configure it on the
> recipient list
> http://camel.apache.org/recipient-list.html
>

The options is missing but I have logged a ticket to add it for Camel 2.5
https://issues.apache.org/activemq/browse/CAMEL-3002

>
>>
>>> --
>>> View this message in context: http://camel.465427.n5.nabble.com/recipientList-parallelProcessing-aggregationStrategy-tp2255971p2255971.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
>>
>
>
>
> --
> 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
>



-- 
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

Mime
View raw message