Grokbase Groups Camel users July 2010
FAQ
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?

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

Search Discussions

  • Claus Ibsen at Jul 27, 2010 at 4:14 pm

    On Tue, Jul 27, 2010 at 5:43 PM, Marco Crivellaro 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
    --
    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 at Jul 27, 2010 at 4:19 pm

    On Tue, Jul 27, 2010 at 6:13 PM, Claus Ibsen wrote:
    On Tue, Jul 27, 2010 at 5:43 PM, Marco Crivellaro
    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

    --
    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 at Jul 27, 2010 at 4:22 pm

    On Tue, Jul 27, 2010 at 6:18 PM, Claus Ibsen wrote:
    On Tue, Jul 27, 2010 at 6:13 PM, Claus Ibsen wrote:
    On Tue, Jul 27, 2010 at 5:43 PM, Marco Crivellaro
    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
  • Marco Crivellaro at Jul 28, 2010 at 7:32 am
    Looking forward to give it a try!
    --
    View this message in context: http://camel.465427.n5.nabble.com/recipientList-parallelProcessing-aggregationStrategy-tp2255971p2256665.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Claus Ibsen at Jul 28, 2010 at 7:37 am

    On Wed, Jul 28, 2010 at 9:32 AM, Marco Crivellaro wrote:

    Looking forward to give it a try!
    --
    Willem have already implemented it and committed it to trunk. So you
    can try out a SNAPSHOT version of you like
    http://camel.apache.org/download.html

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedJul 27, '10 at 3:43p
activeJul 28, '10 at 7:37a
posts6
users2
websitecamel.apache.org

2 users in discussion

Claus Ibsen: 4 posts Marco Crivellaro: 2 posts

People

Translate

site design / logo © 2023 Grokbase