camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Fetch size in mail component
Date Tue, 16 Oct 2012 08:51:47 GMT
On Mon, Oct 15, 2012 at 6:57 AM, Ketan Barapatre
<ketanbarapatre@gmail.com> 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

Mime
View raw message