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 EBCC317D46 for ; Mon, 30 Mar 2015 16:29:52 +0000 (UTC) Received: (qmail 3724 invoked by uid 500); 30 Mar 2015 16:29:52 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 3680 invoked by uid 500); 30 Mar 2015 16:29:52 -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 3641 invoked by uid 99); 30 Mar 2015 16:29:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Mar 2015 16:29:52 +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.213.178 as permitted sender) Received: from [209.85.213.178] (HELO mail-ig0-f178.google.com) (209.85.213.178) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Mar 2015 16:29:48 +0000 Received: by igbud6 with SMTP id ud6so80205351igb.1 for ; Mon, 30 Mar 2015 09:28:43 -0700 (PDT) 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=0xzJjTQUwAHtjzyn10N7tFZNsF8pWAmEBXQy292VctA=; b=nqB6QEt7mqWQ2JcG4m72lrCun28us9uyaNNBbVMCGGfCvbdfAPd0LGn6V+iGHoO1cE JEgiKPNZBT7T5UzIRFdbSQijvdlG8edu+QU//WSWntRoF65OIw/ivw9OYWa/E+fx536d iRjuGodAaU7mP+PyuIle3PEhHkyFnpmrj9HhymjHynsYGT1IzVm/DF/B3R68W7kuKbPT arsIWPC+IF1v9H27lp7NovlyywpdLzGwy6x27QJ1i4O13+ET2BUD5TtkhNlk54W97679 XFB05Zz8oS0hzmipq5UiKtRV+7ONULRNFFnRolUZG6Bt1WmOm5psSIkeKqU19w19WExF 5mWg== X-Received: by 10.42.67.19 with SMTP id r19mr37202024ici.30.1427732923192; Mon, 30 Mar 2015 09:28:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.149.2 with HTTP; Mon, 30 Mar 2015 09:28:22 -0700 (PDT) In-Reply-To: <1427472944200-5764924.post@n5.nabble.com> References: <1427472944200-5764924.post@n5.nabble.com> From: Claus Ibsen Date: Mon, 30 Mar 2015 18:28:22 +0200 Message-ID: Subject: Re: Idepotent repository update inside a camel Processr To: "users@camel.apache.org" Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Hi Yeah sure you can use the api of idempotent repository to add/confirm/remove keys as you like. Just mind that if you use the idempotentConsumer EIP it does its own add/confirm etc on the repo as well. So you may need to take over this and not use idempotent consumer and do all the needed work yourself. On Fri, Mar 27, 2015 at 5:15 PM, mohammed.rafi wrote: > Hi All, > > I am working on a application where I need to read data/records from a set > of files and updating them into database. > > In case of error during file processing/db update (file is partially > processed), I should be able to re-process the file and exclude the records > which are already updated in DB. > > I am planning to use of the Idempotent repository. > Sample usages of idempotent repository in camel documentation, shows up as > repository should be called/updated as part of camel route while each > record/exchange is being read and processed. > > But in my case I would aggregating the records and updating the DB in > batches. > > So my question is, > > Can I call the idempotent repository bean methods to add/remove record > keys/ids explicitly inside a camel processor?? after DB update is called on > a batch.! > > My requirement is: > I should be able to add the records unique key to the Idempotent Repository > only when the DB batch update successful. > > This will ensure that next time when I took of the same file for > reprocessing I only process the failed records from the file. > > Expecting an answer to my question asap and any alternative suggestions! > > thanks, > Rafi > > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/Idepotent-repository-update-inside-a-camel-Processr-tp5764924.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 hawtio: http://hawt.io/ fabric8: http://fabric8.io/