activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mykola <>
Subject Message Queue get stuck with 2 consumers connected to it
Date Tue, 25 Sep 2007 15:38:26 GMT

Hi all
I'm using network of brokers config with 2 brokers
After some time one of the queues on one broker stopped dispatching messages
to its 2 consumers, log files contained no errors and any kind of strange
behavior, 3 other queues on the same broker were just fine

my config file for brokers is as simple as following

<broker brokerName="sonoportal-amq" useJmx="true"
        <managementContext connectorPort="1100"
jmxDomainName="org.apache.activemq" />
        <transportConnector name="openwire"
uri="tcp://" />
        <networkConnector uri="static:(tcp://"
networkTTL='5' dynamicOnly='true'/>

And symmetric one for second broker

Listeners are configured with Spring and has a following configuration

    <bean id="mailJmsListenerContainer"
        <property name="concurrentConsumers" value="2" />
        <property name="connectionFactory" ref="jmsConnectionFactory" />
        <property name="destination" ref="mailJmsDestination" />
        <property name="messageListener">
        	 <ref bean="mailJmsListener"/>
        <property name="sessionTransacted" value="true"></property>

Connection Factory is 

	<bean id="jmsConnectionFactory"
		init-method="start" destroy-method="stop" depends-on="jmsBroker">
		<property name="connectionFactory">
				<property name="brokerURL"			
				<property name="redeliveryPolicy">
					<bean class="org.apache.activemq.RedeliveryPolicy">
						<property name="backOffMultiplier" value="3"/>
						<property name="useExponentialBackOff" value="true"/>
						<property name="maximumRedeliveries" value="11"></property>
						<property name="initialRedeliveryDelay" value="2000"></property>
	<!-- JMS queue for sending Mail -->
	<bean id="mailJmsDestination"

I monitored the Brocker with JMX and get the increasing queue size. What is
the problem here? Why messages get stuck in the Queue.
I'm using 4.1.1 version with Spring 2.0.5

Interesting thing that after restarting of the server, messages get
consumed, so I assume the problem might be in listeners. One more
interesting bug is that after they get consumed QueueSize attribute became
negative, how this can be possible, I assume that it get calculated as
EnqueueCount - DequeueCount, which is not correct if broker get restarted

Thanks in advance for any help
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message