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.
I attach a picture with the results of the measurement.
This problem affects not a specific version.