Camel RabbitMQ component allows setting both the option concurrentConsumers
and threadPoolSize
. Their description and defaults is as follows:
concurrentConsumers
- default 1 - Number of concurrent consumers when consuming from broker. (eg similar as to the same option for the JMS component).
threadPoolSize
- default 10 - The consumer uses a Thread Pool Executor with a fixed number of threads. This setting allows you to set that number of threads.
Could someone explain how these two will interact, particularly from the performance standpoint?
In particular, going into nuance a bit:
- Are they roughly interchangeable? I.e. is it roughly true that 2 consumers, 5 threads ~ 5 consumers, 2 threads?
- Does each concurrent consumer get as many threads as specified in
threadPoolSize
or are these threads shared between all concurrent consumers?
Many thanks!