DefaultMessageListenerContainer reacts to maxConcurrentConsumers reduction for long-lived tasks (SPR-7075)

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3286 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Juergen Hoeller 2010-04-22 13:27:16 +00:00
parent 64228e966c
commit 75c9ff2662
1 changed files with 3 additions and 0 deletions

View File

@ -989,6 +989,9 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
if (wasWaiting) {
activeInvokerCount++;
}
if (scheduledInvokers.size() > maxConcurrentConsumers) {
active = false;
}
}
if (active) {
messageReceived = (invokeListener() || messageReceived);