Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3556310671 for ; Tue, 4 Feb 2014 11:31:36 +0000 (UTC) Received: (qmail 16280 invoked by uid 500); 4 Feb 2014 11:31:33 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 15318 invoked by uid 500); 4 Feb 2014 11:31:32 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 13906 invoked by uid 99); 4 Feb 2014 11:31:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Feb 2014 11:31:29 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.219.50 as permitted sender) Received: from [209.85.219.50] (HELO mail-oa0-f50.google.com) (209.85.219.50) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Feb 2014 11:31:26 +0000 Received: by mail-oa0-f50.google.com with SMTP id n16so9550660oag.23 for ; Tue, 04 Feb 2014 03:31:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=Un6Ws7+BmaYBbRPu9JlWRIM+E3/JzAAzpOUboozqyRI=; b=J5FA0I8kTSxzWlj6BB4yJ71s2oTZPDop3YoxRGSOMuMcWBrRICmq/E91T7e9Bic63r JNXNLgGg4Xnronqmq+ur2PENita4nnAMJ5C90EINRmL9iYh5RptH3Y1DJvt92IVWmqjk kbir/5a2IfnPR53AQbTkuE3ftsSp77W/HQOurzDSjVdxcXOObIze8jOoQQmC/Li1pUJu jv0oX2OH099gTqYh0I7pmzReBWnAkyP5aFCkrOydddp8XhRoJZr4yB25ST5VaQERbcKF fLEUKEsegJxyITtRUWXlFQRL8I7I09zQmU+oUViZlfJZgREPrdxj3++teC5Mhwfwno+U KFXQ== X-Received: by 10.60.103.239 with SMTP id fz15mr35218784oeb.22.1391513465250; Tue, 04 Feb 2014 03:31:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.60.61.17 with HTTP; Tue, 4 Feb 2014 03:30:45 -0800 (PST) In-Reply-To: <1391508577416-5746771.post@n5.nabble.com> References: <1391508577416-5746771.post@n5.nabble.com> From: Claus Ibsen Date: Tue, 4 Feb 2014 12:30:45 +0100 Message-ID: Subject: Re: aggregationStrategy - passing last value to next aggregate To: "users@camel.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org 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 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