We are using Spring Integration with ActiveMQ for performance tests, we see the below issue with the consumer. I have added the jms.prefetchPolicy.queuePrefetch=0 as well to the connection factory but it doesn't show any effect.
1. Consumer is consuming the message from queue if the message is placed for the first time after the application server startup 2. When a second message is placed after the first message is processed, the second message is not delivered to the consumer 3. Any further messages placed into the queue are not delivered or consumed 4. That means application is processing only the very first message available after the startup Below is the activemq broker configuration <?xml version="1.0" encoding="UTF-8"?> <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" persistent="true" dataDirectory="${activemq.data}" schedulePeriodForDestinationPurge="10000" deleteAllMessagesOnStartup="true"> <destinationPolicy> <policyMap> <policyEntries> <policyEntry queue=">" maxPageSize="5000" gcInactiveDestinations="true" inactiveTimoutBeforeGC="300000"> <pendingMessageLimitStrategy> <constantPendingMessageLimitStrategy limit="1000" /> </pendingMessageLimitStrategy> </policyEntry> </policyEntries> </policyMap> </destinationPolicy> <managementContext> <managementContext createConnector="false" /> </managementContext> <persistenceAdapter> <kahaDB directory="${activemq.data}/kahadb" /> </persistenceAdapter> </broker> Below shows the ActiveMQ Connection factory <beans:beans profile="when"> <beans:bean id="connectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory" destroy-method="stop"> <beans:property name="connectionFactory"> <beans:bean class="org.apache.activemq.ActiveMQConnectionFactory"> <beans:property name="brokerURL"> <beans:value>tcp://localhost:61616?jms.prefetchPolicy.queuePrefetch=0</beans:value> </beans:property> </beans:bean> </beans:property> </beans:bean> <beans:bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate"> <beans:property name="connectionFactory"> <beans:ref bean="connectionFactory" /> </beans:property> </beans:bean> </beans:beans> Can someone please suggest what needs to be corrected for it to consume all the messages as when they are placed into the queue? -- View this message in context: http://activemq.2283324.n4.nabble.com/Consumer-not-getting-the-second-message-tp4726414.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.