On Sun, Dec 6, 2009 at 9:03 PM, Seb- <[email protected]> wrote: > > I think there is a small problem with this solution that will make it > unusable as-is for the case when RecipientList returns dynamic recipient > list. > AggregationStrategy uses a predefined static messagecount while > RecipientList may return a dynamic recipient list at runtime (ie in my > example a certain message might flow out only through o2 and not o1). > So the AggregationStrategy would need to update messagecount for certain > message through all their life in the flow (possibly incrementing when a > RecipientList throws 2 entries or keep as-is when only 1 entry). >
No AggregationStrategy does not use a predefined static message count. If your recipient list returns 1 endpoint, the aggregation will only be invoked once, to aggregate o1 with the input message. If your recipient list returns 2 endpoints, the aggregation will be invoked twice, to aggregate o1 with input message, and then o2 with the "result from last aggregation". > > Seb- wrote: >> >> Sounds interesting. >> I'll have a look at this. >> Thanks, >> Sébastien. >> >> >> Claus Ibsen-2 wrote: >>> >>> On Sun, Dec 6, 2009 at 6:53 PM, Seb- <[email protected]> wrote: >>>> >>>> Hi, >>>> Let's say I have 3 components, Component1 is a RecipientList sending the >>>> message to both Component2 and Component3. >>>> Is there an easy configuration way for Camel to do a synchronization on >>>> outputs (o2 & o3) of Component2 & Component3 with the original message >>>> coming from Component1. >>>> >>>> /----[]----- o2 >>>> i1 --[]--/ >>>> \ >>>> \-----[]---- o3 >>>> >>> >>> Yes its possible unfortunately we didnt make that possible easily out >>> of the box until Camel 2.2. You may say that slipped our minds. >>> The recipient list in 2.2 supports AggregationStrategy so you can >>> combine the response from o2 and o3 as you like. >>> >>> Ticket about it >>> https://issues.apache.org/activemq/browse/CAMEL-2223 >>> >>> >>> See more at, section Using custom AggregationStrategy >>> http://camel.apache.org/recipient-list.html >>> >>> See this thread for how you may work around and with some custom >>> coding do that in 2.1 or older >>> http://old.nabble.com/recipientList-multithreading-td26635868.html >>> >>> >>> >>> >>> >>>> Thanks, >>>> Regards, >>>> Sébastien. >>>> -- >>>> View this message in context: >>>> http://old.nabble.com/Group-of-routes-and-Synchronization-on-outputs-of-the-group-after-a-split-tp26667241p26667241.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 >>> >>> >> >> > > -- > View this message in context: > http://old.nabble.com/Group-of-routes-and-Synchronization-on-outputs-of-the-group-after-a-split-tp26667241p26668433.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
