Discussion:
camel-mail validation process
Marco Pampaloni
2018-09-17 14:13:52 UTC
Permalink
Hi everyone, I've been trying to write down a camel route that listens to a
mailbox and downloads the messages when needed... The problem is that the
server contains about 5k mails and it looks like a sort of validation
process takes place before the fetch.
It takes a really long time to complete (probably evaluating 1-2 mail per
second). Is this really necessary? Is there a way to disable this behaviour?

I tried setting fetchSize and maxMessagesPerPoll to low values, but after
inspecting the code on github, it turned out that they both get used after
this "validation process". You can check this out here:
https://github.com/apache/camel/blob/master/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java

At the end of the retrieveMessages method you can see a loop that scans the
retrieved messages, which is genetaring the previously described behaviour.

Can anybody help?
--
Marco Pampaloni
Claus Ibsen
2018-09-18 14:40:54 UTC
Permalink
Hi

You can try to turn of peek with peek=false
On Mon, Sep 17, 2018 at 4:12 PM Marco Pampaloni
Post by Marco Pampaloni
Hi everyone, I've been trying to write down a camel route that listens to a
mailbox and downloads the messages when needed... The problem is that the
server contains about 5k mails and it looks like a sort of validation
process takes place before the fetch.
It takes a really long time to complete (probably evaluating 1-2 mail per
second). Is this really necessary? Is there a way to disable this behaviour?
I tried setting fetchSize and maxMessagesPerPoll to low values, but after
inspecting the code on github, it turned out that they both get used after
https://github.com/apache/camel/blob/master/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
At the end of the retrieveMessages method you can see a loop that scans the
retrieved messages, which is genetaring the previously described behaviour.
Can anybody help?
--
Marco Pampaloni
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Marco Pampaloni
2018-09-19 12:45:46 UTC
Permalink
Unfortunately, it does not work
Post by Claus Ibsen
Hi
You can try to turn of peek with peek=false
On Mon, Sep 17, 2018 at 4:12 PM Marco Pampaloni
Post by Marco Pampaloni
Hi everyone, I've been trying to write down a camel route that listens
to a
Post by Marco Pampaloni
mailbox and downloads the messages when needed... The problem is that the
server contains about 5k mails and it looks like a sort of validation
process takes place before the fetch.
It takes a really long time to complete (probably evaluating 1-2 mail
per
Post by Marco Pampaloni
second). Is this really necessary? Is there a way to disable this
behaviour?
Post by Marco Pampaloni
I tried setting fetchSize and maxMessagesPerPoll to low values, but after
inspecting the code on github, it turned out that they both get used
after
https://github.com/apache/camel/blob/master/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
Post by Marco Pampaloni
At the end of the retrieveMessages method you can see a loop that scans
the
Post by Marco Pampaloni
retrieved messages, which is genetaring the previously described
behaviour.
Post by Marco Pampaloni
Can anybody help?
--
Marco Pampaloni
--
Claus Ibsen
-----------------
Camel in Action 2: https://www.manning.com/ibsen2
--
Marco Pampaloni
Loading...