Em qui., 10 de jul. de 2025 às 07:49, Dipak Rai
<fullstackdipak...@gmail.com> escreveu:
>
> I am using the IMAP component to read emails from a mailbox as below. And
> toying with the 'fetchStrategy' to decide an optimum number of emails to be
> read on every poll.

There is no fetchStrategy parameter in the mail component, which camel
version are you using ?
https://camel.apache.org/components/4.10.x/mail-component.html

> Let's say if I keep the fetchStrategy as 5 and then increase the number of
> threads to 5, would it ensure that all 5 emails are being processed in
> parallel by my Camel route pipeline processors?
>
> ## configure default thread pool profilecamel.threadpool.pool-size =
> 5camel.threadpool.max-pool-size = 10

The mentioned thread-pool is not set in the mail component, however
you can plug a custom thread pool, see scheduledExecutorService
parameter from the mail component, however as far I could read from
the mail component, the fetch messages task is single threaded, so to
answer your question I don't think if you set a custom thread pool
then each message would be processed in parallel.
I suggest you play around with a custom scheduledExecutorService to
see how it works.

-- 
  Claudio Miranda

clau...@claudius.com.br

Reply via email to