Reputation: 2497
I have set Custom Thread profile and i could see there are 20 threads created from the below configuration.
<threadPoolProfile id="apthreadprofile" defaultProfile="true" poolSize="20" maxPoolSize="50" maxQueueSize="500" rejectedPolicy="Abort"/>
But i could never see that the thread count getting increased above 20 but the max pool size is configured to 50. When will the max pool size be used?
We tried doing a load test with 50 concurrent users with concurrent sessions, which means there will be 50 concurrent requests but could see only 20 threads at any given time.
Upvotes: 1
Views: 1209
Reputation: 55545
Camel uses the JDK thread pools so you can read about how they work with grow/shrink.
But the short story is that the queue has to be full before it starts new threads above the core size :(
It does not have a nice grow/shrink based on demand, or some kind of watermarks you could set if the queue starts to pile up.
Would be nice to say that if queue is > 20% full then grow thread pool etc. Today its 100% only :(
Upvotes: 4