Details
Description
DefaultJmsMessageListenerContainer uses org.springframework.core.task.SimpleAsyncTaskExecutor as the default task executor.
This causes a lot of thread thrash when setting a positive idleTaskExecutionLimit. New threads are created every time the consumers are refreshed, i.e. closed down and started again to keep the minimum number of them around (= concurrentConsumers).
Replace with org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor instead, with the following config:
- corePoolSize = concurrentConsumers
- maxPoolSize = maxConcurrentConsumers