Scaling back is enabled by setting max-messages-per-task to some value (the default is -1) which means unlimited.
The actual behavior of the task scheduling can be further tweaked by setting idle-task-execution-limit (how many times a consumer can go idle) and idle-consumer-limit (how many idle consumers are allowed). When max-messages-per-task is set, a consumer goes idle when that number of receives have been performed.
I suggest you read the javadocs for the DefaultMessageListenerContainer to get a full understanding of these settings. http://static.springsource.org/sprin...Container.html
Gary P. Russell
Spring Integration Team
SpringSource, a division of VMware