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 1C1287F8E for ; Thu, 20 Oct 2011 12:30:46 +0000 (UTC) Received: (qmail 82394 invoked by uid 500); 20 Oct 2011 12:30:45 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 82267 invoked by uid 500); 20 Oct 2011 12:30:45 -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 82259 invoked by uid 99); 20 Oct 2011 12:30:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Oct 2011 12:30:45 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mrlalonde@live.ca designates 65.54.190.96 as permitted sender) Received: from [65.54.190.96] (HELO bay0-omc2-s21.bay0.hotmail.com) (65.54.190.96) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Oct 2011 12:30:36 +0000 Received: from BAY160-W47 ([65.54.190.125]) by bay0-omc2-s21.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 20 Oct 2011 05:30:16 -0700 Message-ID: X-Originating-IP: [205.194.74.10] From: Mathieu Lalonde To: Subject: Aggregator - how to fail & resubmit if timeout expired Date: Thu, 20 Oct 2011 08:30:16 -0400 Importance: Normal Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 20 Oct 2011 12:30:16.0674 (UTC) FILETIME=[05DB1420:01CC8F24] Hi=2C I was wondering what was the best way to resubmit exchanges that did not ge= t aggregated within a given timeout. from("direct:aggregate") =A0 .aggregate(MyStrategy).completionSize(2).completionTimeout(..) =A0 .to("mock:result")=3B It seems like the completionTimeout is to decide when the exchanges should = be considered aggregated.=A0 I saw an option for discarding exchanges aggre= gated only because of completionTimeout but this is not what I want.=A0 I w= ant them to be considered failed Exchanges so that they can be resubmitted = (via onException()). Our fallback approach would be to throw an exception if Exchange.CamelAggre= gatedCompletedBy =3D=3D timeout.=A0 I was just wondering if there was a mor= e elegant idiom. Thanks! Mathieu P.S. I checked out http://camel.apache.org/aggregator2.html http://camel.apache.org/aggregate-example.html =