Announcement Announcement Module
No announcement yet.
DefaultMessageListenerContainer-consumers not decreasing when idle Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • DefaultMessageListenerContainer-consumers not decreasing when idle


    I have a basic configuration of the DefaultMessageListenerContainer (Spring 3.0.x), for an ActiveMQ jms queue.
    	<bean id="Agent-jms" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
    		<property name="connectionFactory" ref="jmsFactory" />
    		<property name="destination" ref="agentServiceQueue" />
    		<property name="messageSelector" value="JMSCorrelationID is null" />
    		<property name="messageListener">
    			<bean class="org.springframework.jms.listener.adapter.MessageListenerAdapter">
    				<constructor-arg ref="agentService.jmsListener" />
    		<property name="errorHandler" ref="agentService.jmsListener" />
          <property name="maxConcurrentConsumers" value="100" />		
    When the load on the queue increases, I see additional consumers being started, so that works.
    However, when the queue is empty again, all consumers stay alive, none of them quit.

    I would expect, based on the api docs and on Bruce Snyders excellent explanations [1] that idleTaskExecutionLimit which defaults to 1, would have all consumers quit after 1 timed out poll.
    See attached image [2] for a graph on the number of consumers by queue (the sudden drop around 'thu 12:00' is from the container restarting).
    The number of consumers only rises, it never decreases...

    Is there something I overlooked?

    With kind regards,

    [2] Attachment
    Attached Files

  • #2
    Does anyone have an idea about this? Or is my problem statement not clear?