Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E1E12200C63 for ; Thu, 11 May 2017 16:14:48 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E06AB160BC7; Thu, 11 May 2017 14:14:48 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3233D160BB2 for ; Thu, 11 May 2017 16:14:48 +0200 (CEST) Received: (qmail 69066 invoked by uid 500); 11 May 2017 14:14:47 -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 69054 invoked by uid 99); 11 May 2017 14:14:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 May 2017 14:14:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 5F1F4185E85 for ; Thu, 11 May 2017 14:14:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.296 X-Spam-Level: X-Spam-Status: No, score=-2.296 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.796, RCVD_IN_SORBS_SPAM=0.5] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=pronoia-solutions-com.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id S6MxOTjUs0OJ for ; Thu, 11 May 2017 14:14:44 +0000 (UTC) Received: from mail-io0-f172.google.com (mail-io0-f172.google.com [209.85.223.172]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 1C5795FC8A for ; Thu, 11 May 2017 14:14:44 +0000 (UTC) Received: by mail-io0-f172.google.com with SMTP id o12so22131464iod.3 for ; Thu, 11 May 2017 07:14:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pronoia-solutions-com.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=97SUkcKQSUK1l6s4NXqxdIN1kuViriSmLnmHwY79w4M=; b=QQLQ0QNXdZ6TBT1vi1kz+4mwAKRWUPojiTIEcALtU15zQ8oVqD3eSEVQ6wKu2uVZut rYZMt6wMFA0hDpEx1yTHSWt4iRusp9R5La1S2UXnswoLRe6FfDAIquATk8dK+H3Xyigv oAxEYnjiZ1DXV32dSnz4MWX0b8eTa068wsQYtZvur2ATH5BDoaL4WwJfgU3ssVhhcQcS inqEgfA1h8GKtYOCRAjsH+G3VbiL1ONAFWeTMLnaQdhD+TOGahdbMjow+WL5xd9xC57Y BbQeyaA4qMpTPhU9Ux2P6Q/5nPKLlb44t9Yf3WL/ZdSo/2oPIHj0VxxTAaV0Duem+Ikd R/pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=97SUkcKQSUK1l6s4NXqxdIN1kuViriSmLnmHwY79w4M=; b=UpZw2pVaUDYXxFf+wX+sS4juaNyDddYkitgbPL+0MlFFew48tiWnnBK/774G6MB/5Y 03qAUyuwYfopPt65Xs1lcpbcuG9MHt1RwKhNbbvA6gRFoBskGxSAI9Ggx8UekpFDIyFx SdJWwdggv6k5yCLh+5rmnmBE0qofncHXs+it7yuhBUpWlW1M4mFSDGx4Sx/Ymh9U5Xvy OJHNBWCDEYW0uzPIrytjnAhq9JsTcO1KiQx6qsg0wIH69v4VJk3yD0N9Q2ffIz4aKmHE aaNEsdnivaUKjyUzx0P0Z6LzaADZHINiZ3WRTh85DagFLoyyIU1e48CP3JziRK+qowgw Re1g== X-Gm-Message-State: AODbwcDlz4RsBL7Lf2Ms3+X8ZlXL2RCFfMqDtsKTKo/7o9OUTDmaxFjC 5kdawRsAmhcHTqiYqQk= X-Received: by 10.107.180.130 with SMTP id d124mr593360iof.47.1494512083330; Thu, 11 May 2017 07:14:43 -0700 (PDT) Received: from [10.155.59.170] (96-86-215-94-static.hfc.comcastbusiness.net. [96.86.215.94]) by smtp.gmail.com with ESMTPSA id y125sm295501itb.4.2017.05.11.07.14.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 May 2017 07:14:42 -0700 (PDT) From: Quinn Stevenson Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Good / Adviced way to poll an entire folder at scheduled moment Date: Thu, 11 May 2017 08:14:49 -0600 References: To: users@camel.apache.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3273) archived-at: Thu, 11 May 2017 14:14:49 -0000 I=E2=80=99ve done this with a combination of a ScheduledRoutePolicy (to = start the route when I want to start reading the directory) and a call = to the control bus when all the files have been processed. I use the = =E2=80=9CsendEmptyMessageWhenIdle=E2=80=9D option on the file component = to detect when it=E2=80=99s done. HTH > On May 8, 2017, at 8:49 AM, Jonathan Schoreels = wrote: >=20 > Hi. >=20 > I would like to know, in your experience, what's the best way to poll = an > entire folder/remote folder, at an regular interval ? >=20 > It could seems quite easy, since the the file consumer can be used as = a > batch consumer, that a scheduler can be used with it, but I have some > limitation each time : >=20 > 1. Batch consumer : How to set a "good maxMessagePerPoll" ? If I = hardcode > it, and poll those messages each day, I'm not future proof if more = file > comes. > 2. poll enrich only poll one at a time. So if I need to poll ALL the = folder > each day, it doesn't help me. > 3. having to start/stop routes with controle bus seems lot of > tweaks/hacking just to design a simple flow. >=20 > Have you any suggestion ? >=20 > Jonathan