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 41FA42BEA for ; Thu, 5 May 2011 06:14:23 +0000 (UTC) Received: (qmail 18237 invoked by uid 500); 5 May 2011 06:14:22 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 18032 invoked by uid 500); 5 May 2011 06:14:21 -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 18024 invoked by uid 99); 5 May 2011 06:14:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2011 06:14:20 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.212.169 as permitted sender) Received: from [209.85.212.169] (HELO mail-px0-f169.google.com) (209.85.212.169) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2011 06:14:15 +0000 Received: by pxi9 with SMTP id 9so1302416pxi.14 for ; Wed, 04 May 2011 23:13:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=WnROVR1HeD71kWF0/VEJ0nrRoAp7bCJ4U0AKDcvEVaI=; b=KBMxMsmyWuI8cYf6Bt1hZtj/SsX1ACyfsc+/rEkc+8oVran50MVoqz2Kdkld03LS6M e7dy+W1vluAz1/c2hF6p6uD8nGOcPaPpRIE8RZrzsEaJo5YhsYvbmomwwizUr7PD2qoo VGRQHTCvOCBN5KK8T8pdE+qr8URFAcGx3Tglw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=pV9x02QCTJD4AOIqyIsH6NTdOZkkhmd4te5Gz9MaDlY9u8UOgm27l2VX0YJmlxH2nm MHnTFYviRTSEXTXB4reYydCIljnkYZl+iwIPJKwTKInxc+L+kCqtDHmothSWsIVXHY7O HLwJ9wBxWRnH7c221A/8qO1JsEpwBn+8irjA4= Received: by 10.68.29.229 with SMTP id n5mr2948344pbh.176.1304576033443; Wed, 04 May 2011 23:13:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.57.1 with HTTP; Wed, 4 May 2011 23:13:33 -0700 (PDT) In-Reply-To: <1304539507928-4370930.post@n5.nabble.com> References: <1304523741531-4370197.post@n5.nabble.com> <1304539507928-4370930.post@n5.nabble.com> From: Claus Ibsen Date: Thu, 5 May 2011 08:13:33 +0200 Message-ID: Subject: Re: Error recovery To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi A good approach could be to design your applications to detect duplicate messages. See the idempotent consumer. http://camel.apache.org/idempotent-consumer.html That is much easier than trying to have a high QoS of delivering a message exactly once. That is frankly very hard as you need tight bookkeeping to keep state of delivery and ack of messages. You can detect the duplicates in the Camel application or on the receiver side of the message broker. Or in both for the matter. An alternative is to split the file into 1 message per file. And then consume those files. That is possible since a file is persistent. And Camel only delete/moves the file if it could successfully process it. big file -> N files -> JMS On Wed, May 4, 2011 at 10:05 PM, boday wrot= e: > It won't resume where it left off by default. =A0Camel will only delete t= he > file if it was successfully processed and when it fails, the portion alre= ady > send to AMQ will not be rolled back. =A0When the process resumes, it will > process the entire file again. =A0One option is to use the file's moveFai= led > option to move the file if it failed for special processing (if already > queued, ignore, etc)... > > > shailesh wrote: >> >> Hi, >> =A0 =A0I have camel in the web container. And I am processing the xml fi= le and >> spliting it and posting the split message to JMS queue. >> =A0 =A0The question I have that if the server was the crash in the middl= e of >> the processing of the file. >> =A0 =A0I would like the recovery from the failure to begin the processin= g from >> where the file was left off. >> >> =A0 >> =A0 >> =A0 =A0 =A0 >> =A0 =A0 =A0 =A0 =A0 =A0 /foo/bar >> =A0 =A0 =A0 =A0 =A0 =A0 >> =A0 =A0 =A0 =A0 >> =A0 >> >> =A0 =A0Thanks for suggestion. >> > > > ----- > Ben O'Day > IT Consultant -http://benoday.blogspot.com > > -- > View this message in context: http://camel.465427.n5.nabble.com/Error-rec= overy-tp4370197p4370930.html > Sent from the Camel - Users mailing list archive at Nabble.com. > --=20 Claus Ibsen ----------------- FuseSource Email: cibsen@fusesource.com Web: http://fusesource.com CamelOne 2011: http://fusesource.com/camelone2011/ Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/