activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vlaxmi <>
Subject Messages not received after setting the topicPrefetch
Date Thu, 10 Apr 2014 06:53:22 GMT

Below is the config in broker (activemq.xml)

<policyEntry topic="test.>" topicPrefetch="100"
advisoryForDiscardingMessages="true" advisoryForSlowConsumers="true" >
                        <constantPendingMessageLimitStrategy limit="43"/>

The publisher is publishing large number of messages continuously. However,
the consumer is consuming only first few messages successfully. After that
the messages published by producer are not consumed by the consumer.

The consumer config is as below - 

 <bean id="testConnectionFactory"
   		<property name="brokerURL" value="${mq.brokerUrl}"/>    
   		<property name="alwaysSessionAsync" value="true"/>
   		<property name="copyMessageOnSend" value="false"/>
   		<property name="optimizeAcknowledge" value="true"/>
   		<property name="useAsyncSend" value="true"/>
   		<property name="watchTopicAdvisories" value="false" />
 	<bean id="testPooledConnectionFactory"
           <constructor-arg ref="testConnectionFactory" />
           <property name="idleTimeout" value="0" /> 
	  <bean id="testListenerAdapter"
	   		<property name="delegate" ref="testMessageHandler"/>

Why would the consumer receive only first few messages and rest all are
discarded ? If the topicPrefetch is not configured in the broker, then all
works good. However, I want to add prefetch limit to limit the number of
messages buffered on slow consumer.

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

View raw message