activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JuliusDev <>
Subject JMS Consumer count increase and no msg are consume
Date Wed, 30 Sep 2009 16:05:41 GMT


Can you help to understand why my consumers stop after few msg !?
I develop a webapp with an embed jms broker and a download queue (activemq +
spring2.5 ). After few msg the number of consumers increase to reach the
maximun number 10 and consumer stop. I can send msg in queue : the queue
size increase but they are not consume and no exception is threw :-(

Here my application context config :

	<!--  lets create an embedded ActiveMQ Broker -->
	<amq:broker useJmx="true" persistent="true">
			<amq:amqPersistenceAdapter directory="/tmp/activemq-data" />

			<amq:transportConnector uri="tcp://localhost:0" />


	<!--  ActiveMQ destinations to use  -->
	<!-- Queue of message from  the encoder components  -->
	<amq:queue id="fromEncoderQueue" physicalName="fromEncoderQueue" />

	<!-- Queue fo message to the encoder components  -->
	<amq:queue id="toEncoderQueue" physicalName="toEncoderQueue" />

		JMS ConnectionFactory to use, configuring the embedded broker using
	<amq:connectionFactory id="jmsFactory"
brokerURL="vm://localhost?jms.prefetchPolicy.all=0" />

	<!-- Define the Spring JMS template -->
	<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
		<!--  property name="connectionFactory" ref="connectionFactory"/ -->
		<property name="connectionFactory">
			<!-- lets wrap in a pool to avoid creating a connection per send -->
			<bean class="org.springframework.jms.connection.SingleConnectionFactory">
				<property name="targetConnectionFactory">
					<ref local="jmsFactory" />

    A producer to send msg to the queue.encoder.responses
	<bean id="msgFromEncoderProducer" class="com.cellfish.jms.JMSProducer">
		<property name="template" ref="jmsTemplate" />
		<property name="destination" ref="fromEncoderQueue" />

    A producer to send msg to the queue.encoder.requests
	<bean id="msgToEncoderProducer" name=""
		<property name="template" ref="jmsTemplate" />
		<property name="destination" ref="toEncoderQueue" />

	<!-- this is the Message Driven POJO (MDP) -->
	<bean id="msgFromEncoderListener"
class="com.cellfish.jms.MsgFromEncoderListener" />

	<!-- this is the Message Driven POJO (MDP) -->
	<bean id="msgToEncoderListener"
class="com.cellfish.jms.MsgToEncoderListener" />

	<jms:listener-container connection-factory="jmsFactory" concurrency="10">
		<jms:listener destination="toEncoderQueue" ref="msgToEncoderListener" />
		<jms:listener destination="fromEncoderQueue" ref="msgFromEncoderListener"

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message