DefaultMessageListenerContainer, maxConcurrentConsumers and shrinking of consumers
Hi,
I am using the DefaultMessageListenerContainer and it states in the documentation that is I use maxConcurrentConsumers then threads will shrink back to the concurrentConsumers value after a specific time. I don't see that happening, with the number of threads staying at the maxConcurrentConsumers value.
I use default values for all the rest. This means, based on my understanding, that maxMessagesPerTask remains at its Integer.MIN_VALUE, and the thread executor is the SimpleAsyncTaskExecutor.
Looking at the runnable code, it looks like this code will be executed:
while (isActive()) {
waitWhileNotRunning();
if (isActive()) {
messageReceived = invokeListener();
}
}
And it seems like it will never exit the thread in order to perform the dynamic shrinking (which based on the javadoc it should shrink).
Am I missing something?