Luis Maldonado
Luis Maldonado

Reputation: 31

Camel RabbitMQ concurrentConsumers and threadPoolsize for messages that must be processed in sequence

I have a camel route processing messages from a RabbitMQ endpoint. I am keeping the defaults for concurrentConsumers (1) and threadPoolSize(10).

I am relative new to RabbitMQ, and still do not quite understand the relationship between the concurrentConsumer and threadPoolSize properties. The messages in my queues need to be processed in sequence, which I think shall be achieved by using a single consumer. However, will using a threadPoolSize value greater than one cause messages to be processed in parallel?

Upvotes: 3

Views: 710

Answers (1)

kinaesthesia
kinaesthesia

Reputation: 703

The default value is 10 (source : https://camel.apache.org/components/latest/rabbitmq-component.html)

It won't affect your concurrency. That means the only one consumer will have 10 threads available to use for the process. You can check at exclusiveConsumer if you want only one consumer shared between all your apps (needed if you could have multiple apps targeting the queue)

Upvotes: 2

Related Questions