Mail Component: Polling performance

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Mail Component: Polling performance

Shenavai, Manuel
Hi all,

we use the camel mail component and noticed a performance issue if we poll a mailbox with a lot of messages (30.000+), though we set a small value for maxMessagesPerPoll and FetchSize. I found that all available messages are looped through multiple times.

In a test I measured the number of messages processed in 5 seconds for different amount of available messages in the inbox before and after optimizing the code. MaxMessagePerPoll is set to 3.

Number of message in the inbox            No. of message processed in 5 seconds               No of msg processed in 5 seconds (after codechange)
5.000                                                                    600                                                                                       950
15.000                                                                  320                                                                                       780
30.000                                                                  165                                                                                       600
60.000                                                                  80                                                                                          400


You can find the change here:
https://github.com/mash-sap/camel/commit/1a92bf9da8f06541a926e5f9c78947c2e62ef7f2

Can you please check the code and let me know if this code could be contributed?

Thanks in advance &
Best regards,
Manuel

Reply | Threaded
Open this post in threaded view
|

Re: Mail Component: Polling performance

Claus Ibsen-2
Hi

Thanks for sharing this. Yeah you can create a JIRA and provide a PR
or patch file.

And then explain why you dont validate if idempotent consumer is set,
or remove this code.

On Tue, Jan 21, 2020 at 7:08 PM Shenavai, Manuel
<[hidden email]> wrote:

>
> Hi all,
>
> we use the camel mail component and noticed a performance issue if we poll a mailbox with a lot of messages (30.000+), though we set a small value for maxMessagesPerPoll and FetchSize. I found that all available messages are looped through multiple times.
>
> In a test I measured the number of messages processed in 5 seconds for different amount of available messages in the inbox before and after optimizing the code. MaxMessagePerPoll is set to 3.
>
> Number of message in the inbox            No. of message processed in 5 seconds               No of msg processed in 5 seconds (after codechange)
> 5.000                                                                    600                                                                                       950
> 15.000                                                                  320                                                                                       780
> 30.000                                                                  165                                                                                       600
> 60.000                                                                  80                                                                                          400
>
>
> You can find the change here:
> https://github.com/mash-sap/camel/commit/1a92bf9da8f06541a926e5f9c78947c2e62ef7f2
>
> Can you please check the code and let me know if this code could be contributed?
>
> Thanks in advance &
> Best regards,
> Manuel
>


--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2