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 AD20A18C25 for ; Thu, 28 Jan 2016 07:59:42 +0000 (UTC) Received: (qmail 96054 invoked by uid 500); 28 Jan 2016 07:59:08 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 96008 invoked by uid 500); 28 Jan 2016 07:59:08 -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 95995 invoked by uid 99); 28 Jan 2016 07:59:08 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jan 2016 07:59:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 9CB50C2DD0 for ; Thu, 28 Jan 2016 07:59:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.099 X-Spam-Level: X-Spam-Status: No, score=-0.099 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 5g1QOBNiCgv8 for ; Thu, 28 Jan 2016 07:58:55 +0000 (UTC) Received: from mail-ig0-f171.google.com (mail-ig0-f171.google.com [209.85.213.171]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id D0A3D43F59 for ; Thu, 28 Jan 2016 07:58:54 +0000 (UTC) Received: by mail-ig0-f171.google.com with SMTP id ik10so8058302igb.1 for ; Wed, 27 Jan 2016 23:58:54 -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=T5e8rXJcayH8jclBOXQvOEZnNrkkUK9s49mgyGHxlNU=; b=ovERyPM+uj4LVqoEHXqETmmoNOJ5T0WMCtR/nItbhoGvsqASkQQL8E4+p0voOI5Mjn YHp1DxV2clOrXEHVFYTNYa2/RzDTRm9swOMo3kXLJmpMIrVxJFMEi54/BL03QIfmvGP9 mKLH87F/N80J/fj8SUIyHzx9M/9cY7rfdCjGv9Q9O89IUB9J2O/oU4N/2+hzrvsUXszE zI2YJHvBwYuiobULvtCjoE28yJPjxwiDYVPE7KJXOwJwmIGOG7NyVbnXXGNw5i4pu2Pj CIUyFc9k+tqGvRTt9MEFPxECfDjQrKSXTuDieahAUBSv5kI5ySas90cL3a8a1VpdZaKt lhNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=T5e8rXJcayH8jclBOXQvOEZnNrkkUK9s49mgyGHxlNU=; b=ecL0YTqI6y5Ov9ZfjXCNaqkuqj6cVfyQlBepb6tfK6cel2ufqLEY6PkfAJt2a1IrnM aIIDfmFvmbf5z9rRGyOKBTH6G7at50AW4Ez/+DfXgYsTlvU6ThB0LfC4Fs8kuO7dLhOb bjnFek2hNkRK2Pxn5mbErxc2Ttn1uX1ub8J2AGjCJur5pkVomlhiPmtgXFH0ojK3xkQd 7FYSI66STxn9lbZcK7KCQ8JJdJxE1d38NQrf1JKY1kzlssod52P7FIkIQiA1PlvnH9X3 rKxGzhUlUO8li9lE7ZWMhVeUXgpXfYk49q5G5C17MIO9vWtTZ3elSSWJVOJXBaCnlNAw jb6w== X-Gm-Message-State: AG10YOQK+ZAgz2vQtHtkDJJQ7nWPjhYyH7GBzT1CL0nHXFiiLkpk9sW+eeA5ZOnpaNUqPGXw+LN5D/SOu4H+Nw== X-Received: by 10.50.79.202 with SMTP id l10mr1889689igx.46.1453967934476; Wed, 27 Jan 2016 23:58:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.0.214 with HTTP; Wed, 27 Jan 2016 23:58:35 -0800 (PST) In-Reply-To: References: From: Claus Ibsen Date: Thu, 28 Jan 2016 08:58:35 +0100 Message-ID: Subject: Re: Camel file component URI dynamic options & Filter query To: "users@camel.apache.org" Content-Type: text/plain; charset=UTF-8 You can use a singleton java bean to store the state of that sequence and then in the file route use that in a file filter to only pickup the correct file. You can implement a custom file filter, using the filter option, where you can then access that singleton bean to get that sequence number. The other route can then also call that singleton bean where it can update the sequence. On Wed, Jan 27, 2016 at 10:34 PM, Felix Thomas wrote: > hello, > > I am trying to make a scenario execute using Camel Spring DSL . > > My idea is to processing some files in a numerical seq order from a > folder , after processing a file I need to check for the next file > sequence which need to be processed from DB. > The logic of get the next sequence is okay but i am not sure how do i > pass this information to another route to process that single file only . I > though about using sequencer etc. but it does not seem fitting it. The only > option i see is using File Filter . > But how do I pass this information to a another route . For example I > have to test below approach(Not sure if its right way to go). > > > I tried the UserCSVTODB route just to test , the filter worked fine but > the other files also got moved to the complete folder. I expected that only > the matched file in filter should be moved and not others. Is there any way > I can make this happen , so in the next run it picks > the next sequence file . (probably I need to loop back which is another > question ) > > > > > > data.4.csv (this will be replaced which a processor > or bean call) > > > > > > > uri="file:///C:\FS\processing?readLock=true&charset=utf-8&move=C:\FS\complete"/> > > ${in.header.CamelFileName} == 'data.4.csv' > > > > > > > regards, > Felix -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2