The application that I am working on listens to a queue. This queue receives multiple files(Buy/Sell order) from upstream. I am new to this application and trying to underatnsd how multiple files are process. We are using camel to listen to the queue. I understand that camel listens to the queue and when a file comes in it reads it and routes it to a java file to process it. My question is meanwhile a second or 100 messages arrives on the queue. How are these multiple files handles..would camel spawn a new thread to keep listening to messages while other thread routes it??
Asked
Active
Viewed 361 times
0
-
The camel-jms component uses Spring JMS that handles the threading model. So you can also find some information how Spring JMS works (eg its message container listener) – Claus Ibsen Jun 11 '18 at 06:24
1 Answers
1
Would camel spawn a new thread to keep listening to messages while other thread routes it?
This depends on your camel jms consumer setup for concurrentConsumers
and maxConcurrentConsumers
.
concurrentConsumers
specify the initial number of concurrent consumer (listener thread/caller thread) for the route. Similarly, maxConcurrentConsumers
specify the maximum number of concurrent consumer for the route.
Camel will spawn a new thread for the jms route if maxConcurrentConsumers
> concurrentConsumers
and hit the limit for consumers.

hk6279
- 1,881
- 2
- 22
- 32