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

  • DefaultMessageListenerContainer-consumers not decreasing when idle

    Hi,

    I have a basic configuration of the DefaultMessageListenerContainer (Spring 3.0.x), for an ActiveMQ jms queue.
    Code:
    	<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" />
    			</bean>
    		</property>
    		<property name="errorHandler" ref="agentService.jmsListener" />
    		
          <property name="maxConcurrentConsumers" value="100" />		
    </bean>
    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,
    Geert


    [1] http://bsnyderblog.blogspot.com/2010...mption-in.html
    [2] Attachment
    Attached Files

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

    Comment

    Working...
    X