Quantcast
Channel: Spring Community Forums - JMS
Viewing all articles
Browse latest Browse all 51

Why ScheduledConsumerCount and ActiveConsumerCount are set to 2 ?

$
0
0
Hello,

I'm trying to configure a spring JMS DefaultMessageListener with Spring 2.5.6.SEC02 that would just treat one message at a time.

Here's my configuration :
Code:

<!-- Spring Queue Containers -->
    <bean id="preProcessConsumerContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
        <property name="autoStartup" value="true" />
        <property name="connectionFactory" ref="qdbGpsConnectionFactory"/>
        <property name="destination" ref="qdbGpsTradeEventQueue"/>
        <property name="sessionTransacted" value="true"/>
        <property name="maxConcurrentConsumers" value="1"/>
        <property name="concurrentConsumers" value="1"/>
        <property name="messageListener" ref="messagePreProcessor"/>
    </bean>

When I connect to the JMXConsole, what I see is ScheduledConsumerCount=2 and ActiveConsumerCount=2 and I also read in the logs that I have two different threads handling my messages (still not sure they are parallel or not). I was expecting only one thread and nothing concurrent and I'm really astonished because reading the documentation of DefaultMessageListenerContainer those values should be between 1 and 1 so ??? 1

jmx-screencap.jpg = JMXConsole screen capture

Any idea on where I should have a look to have just one thread ?
Attached Images

Viewing all articles
Browse latest Browse all 51

Trending Articles