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: aggregationStrategy - passing last value to next aggregate
Date Tue, 04 Feb 2014 11:30:45 GMT
You can keep the last value in the custom agg strategy, and when you
start on a new group, you can use that last value.
Its just java code so you can do what you want in there.


On Tue, Feb 4, 2014 at 11:09 AM, Vinu Raj <vinuraj.maroli@wipro.com> wrote:
> I am using a custom aggregationStrategy to group time ordered records that
> are coming in a file based on timestamp. One aggregation is considered
> completed when there is a certain time delay (say more than 2 mins) between
> last record and current record. Example
>
> record 1, t1
> record 2, t2
> record 3, t3
> record 4, t4
> record 4, t5
>
> Say between t4 and t3 there is lag of 2 minutes. Need this to get separated
> as 2 sets. I can only decide aggregation completion on receiving record 4.
> Timestamps are pushed as message headers which is used for comparison the
> latest record timestamp.
>
> Set 1
> -----------
> record 1, t1
> record 2, t2
> record 3, t3
>
> Set2
> -----------
> record 4, t4
> record 4, t5
>
> What is the best way to achieve this.
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/aggregationStrategy-passing-last-value-to-next-aggregate-tp5746771.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Mime
View raw message