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 665D2D2CC for ; Wed, 17 Oct 2012 07:37:49 +0000 (UTC) Received: (qmail 46303 invoked by uid 500); 17 Oct 2012 07:37:49 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 46113 invoked by uid 500); 17 Oct 2012 07:37: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 46078 invoked by uid 99); 17 Oct 2012 07:37:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Oct 2012 07:37:46 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.217.173 as permitted sender) Received: from [209.85.217.173] (HELO mail-lb0-f173.google.com) (209.85.217.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Oct 2012 07:37:40 +0000 Received: by mail-lb0-f173.google.com with SMTP id gj3so5990276lbb.32 for ; Wed, 17 Oct 2012 00:37:20 -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=hqyGT/ud0aiQ+CcLnhlY3W5hCd/0piN7gdK/ao8zIrE=; b=yxVYnOGm7u12iHxeDpPNXCJaEHWR+kTW0QhXdcwQ/AhpYhdE/bsc5aZXGVJ0JxqiZz LqlhYr8eyADb+v0lLTgSeNmDhbhBYuj6Vkyuz8cxaJqJm4unKuB7bKbcoK3n3GqFt7Zv xL/lDO6gU/Sj4pplqgDfEISBD3IQhggcL/mSkO1s39135/KYXYlbaB6Nj21Q/UNSCHf9 NesBQ6L0WvzIeJhSoQgENUKlIGj/I6R74TCkdc3DSOEH+tMecCd7hamFx2rk44IP2TXv nlZQTOEM4M6VAdAhz1C7vphH1OGiNvfME0RrpflogPMpBV01lKOlO47DgftXBjCM8v45 dKug== Received: by 10.112.45.200 with SMTP id p8mr1264171lbm.27.1350459439938; Wed, 17 Oct 2012 00:37:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.42.9 with HTTP; Wed, 17 Oct 2012 00:36:59 -0700 (PDT) In-Reply-To: References: From: Claus Ibsen Date: Wed, 17 Oct 2012 09:36:59 +0200 Message-ID: Subject: Re: Fetch size in mail component To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Oct 16, 2012 at 2:24 PM, Ketan Barapatre wrote: > "Contributions is welcome " > wow great to hear. > Can you please share your idea for mail filter. I have been through > http://camel.apache.org/contributing > Hi We had an old ticket with this idea but never got around implementing it. And the community didn't ask for it at the time. The ticket has some details https://issues.apache.org/jira/browse/CAMEL-1069 > I will follow instructions. > > Thank you > Ketan > On Oct 16, 2012 2:22 PM, "Claus Ibsen" wrote: > >> On Mon, Oct 15, 2012 at 6:57 AM, Ketan Barapatre >> wrote: >> > Hello All, >> > >> > I have created following route >> > >> > from("imaps://imap.gmail.com?username=" + user.getUserName() + >> "&password=" >> > + user.getPassword() + "&unseen=false&fetchSize=10& >> > consumer.delay=60000").filter( messageFilter).process(mailProcessor); >> > >> > Root specified above starts polling to gmail mailbox and fetches 10 mails >> > per poll then waits for 60000 ms and starts polling again. But when next >> > time polling starts it fetches same 10 messages which was fetched before. >> > Suppose If I have 150 messages in Inbox .When polling starts it fetches >> 1st >> > message from inbox upto 9th message and after 60000 ms when next polls >> > again It fetches same mails. >> > >> > Now I have some sopecific requirments. >> > 1. I want to fetch mails from specified starts date and end date. >> > (Currently I'm checking start date and end date with message header's >> date >> > in message filter) >> > 2. How can I fetch complete mailbox (I have tried to remove fetchSize but >> > fetching was taking too much time because my mailbox has around 20 >> > thousand mails) >> > >> > Please guide me How to give proper fetch size or filter according to >> > specified dates. >> > >> >> We dont have support for using filters on the mail component (yet). >> Contributions is welcome. >> The Java Mail has API for filters. So it should be possible to implement >> this. >> >> >> >> > Thank you >> > Ketan >> >> >> >> -- >> Claus Ibsen >> ----------------- >> Red Hat, Inc. >> FuseSource is now part of Red Hat >> Email: cibsen@redhat.com >> Web: http://fusesource.com >> Twitter: davsclaus >> Blog: http://davsclaus.com >> Author of Camel in Action: http://www.manning.com/ibsen >> -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cibsen@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen