We are currently experience a problem with activemq version 5.4.0 Every 2-4 days of testing we get 1 message stuck on the queue. We have approx 10 queues were we serialize a POJO onto each queue. We have no more than 1000 messages on each queue.
We have up to 5 consumers (slow consumers between 5secs and 1min) on each queue. Each client will wait forever on the queue until the queue is empty. consumerTemplate.receive(MY_QUEUE); Our client connect with a prefetch = 1, we also tried value of 0 failover:(tcp://127.0.0.1:61616)?jms.prefetchPolicy.queuePrefetch=1 <code> <broker xmlns="http://activemq.apache.org/schema/core" brokerName="mainBroker" dataDirectory="${activemq.base}/data" destroyApplicationContextOnStop="true" useJmx="true"> <!-- For better performances use VM cursor and small memory limit. For more information, see: http://activemq.apache.org/message-cursors.html Also, if your producer is "hanging", it's probably due to producer flow control. For more information, see: http://activemq.apache.org/producer-flow-control.html --> <destinationPolicy> <policyMap> <policyEntries> <policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb"> <pendingSubscriberPolicy> <vmCursor /> </pendingSubscriberPolicy> </policyEntry> <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb"> <!-- Use VM cursor for better latency For more information, see: http://activemq.apache.org/message-cursors.html <pendingQueuePolicy> <vmQueueCursor/> </pendingQueuePolicy> --> </policyEntry> </policyEntries> </policyMap> </destinationPolicy> <!-- The managementContext is used to configure how ActiveMQ is exposed in JMX. By default, ActiveMQ uses the MBean server that is started by the JVM. For more information, see: http://activemq.apache.org/jmx.html --> <managementContext> <managementContext connectorPort="2011" jmxDomainName="my-broker" /> </managementContext> <!-- Configure message persistence for the broker. The default persistence mechanism is the KahaDB store (identified by the kahaDB tag). For more information, see: http://activemq.apache.org/persistence.html --> <persistenceAdapter> <kahaDB directory="${activemq.base}/data/kahadb"/> </persistenceAdapter> <plugins> <statisticsBrokerPlugin/> </plugins> <!-- The systemUsage controls the maximum amount of space the broker will use before slowing down producers. For more information, see: http://activemq.apache.org/producer-flow-control.html --> <systemUsage> <systemUsage> <memoryUsage> <memoryUsage limit="256 mb"/> </memoryUsage> <storeUsage> <storeUsage limit="1 gb" name="foo"/> </storeUsage> <tempUsage> <tempUsage limit="300 mb"/> </tempUsage> </systemUsage> </systemUsage> <!-- The transport connectors expose ActiveMQ over a given protocol to clients and other brokers. For more information, see: http://activemq.apache.org/configuring-transports.html --> <transportConnectors> <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/> </transportConnectors> </broker> <!-- Uncomment to enable Camel Take a look at activemq-camel.xml for more details --> <import resource="camel.xml"/> <!-- Enable web consoles, REST and Ajax APIs and demos Take a look at activemq-jetty.xml for more details --> <import resource="jetty.xml"/> </code> two different setups server windows 2008 client windows 7 and server: windows server 2003 client : windows 7 When we restart activemq service the message appears. Is there anything that we can do to prevent this from happening? Thanks -- View this message in context: http://activemq.2283324.n4.nabble.com/Message-stuck-on-queue-tp3076607p3076607.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.