You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Henrique Viecili <he...@myreks.com> on 2012/12/06 20:54:33 UTC

Re: Splitter + aggregator + dynamic timeout

Sorry to revive this post, but I am facing a similar problem.

I see you are doing a split/aggregation with *dynamic timeout* coming from
some property. What I need is to specify the timeout based on the
content/header of the message via Expression... is it possible?

att.
*Henrique Viecili*

On Thu, Aug 16, 2012 at 7:05 AM, Babak Vahdat
<ba...@swissonline.ch>wrote:

>
> Am 16.08.12 11:31 schrieb "Aleksander Pena" unter
> <al...@gmail.com>:
>
> >Hi Babak,
> >
> >your solution works fine but you removed parallel processing which is
> >important for me :)
>
> Just be aware that if you make use of parallelProcessing option then
> you've got no guarantee about the *order* of the outcomes. As an example
> try to run the following unit-test and see how the content of the file
> "target/concurrent/outbox/result.txt" seems like:
>
> https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/a
> pache/camel/component/file/FileConcurrentWriteAppendSameFileTest.java
>
> And that even it's content could be different by each run of the test!
>
> >Anyway I found solution for my original problem:
>
> Happy to hear that.
>
> >
> >1. before processing is started I'm storing current exchange (from a main
> >thread) as a property (myEx). Then myEx property is propagated to splitter
> >threads.
> >2. after aggregation is ended (in splitter thread)  I'm retrieving 'myEx'
> >exchange from properties and set new property on it with aggregation
> >results (myRes).
> >3. after whole processing (when I'm in the main thread again) I'm
> >retrieving myRes property from the exchange and set it as a body :)
> >
> >Thanks guys for all your help,
> >Alek
> >
> >
> >
> >
> >--
> >View this message in context:
> >
> http://camel.465427.n5.nabble.com/Splitter-aggregator-dynamic-timeout-tp57
> >17166p5717486.html
> >Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>