I was able to reproduce this problem on ActiveMQ 5.1 1. Run SimpleBroker Please run MySql first.(I want to use JDBC Master/Slave cluster in production environment)
2. Run SimpleConsumer In SimpleConsumer.java, it actually starts two MessageConsumers: * the first MessageConsumer is blocked in onMessage() by setting consumers[i].setTimeToSleep(Integer.MAX_VALUE); * the other one won't be blocked by setting consumers[i].setTimeToSleep(0); These consumers use the following broker url: "failover:(tcp://localhost:61616,tcp://localhost:61617)?initialReconnectDelay=100&randomize=false"; tcp://localhost:61616 is connectable and tcp://localhost:61617 is not. 3. Run SimpleProducer Send text message in a very fast speed. 4. After several minutes, the following exceptions were printed in SimpleConsumer's Log: Exception in thread "ActiveMQ Transport: tcp://localhost/127.0.0.1:61616" java.lang.OutOfMemoryError: Java heap space Exception in thread "ActiveMQ Transport: tcp://localhost/127.0.0.1:61616" java.lang.OutOfMemoryError: Java heap space The screenshot at that moment is: http://www.nabble.com/file/p20679566/5.1-A.jpg Several seconds later, MessageConsumers seemed to be able to reconnect to the broker. The log of SimpleConsumer is: 2008-11-25 19:13:06,750 WARN [InactivityMonitor Async Task: [EMAIL PROTECTED] - FailoverTransport.java:205] Transport failed to tcp://localhost:61616 , attempting to automatically reconnect due to: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too long: localhost/127.0.0.1:61616 2008-11-25 19:13:06,859 WARN [InactivityMonitor Async Task: [EMAIL PROTECTED] - FailoverTransport.java:205] Transport failed to tcp://localhost:61616 , attempting to automatically reconnect due to: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too long: localhost/127.0.0.1:61616 [Consumer1]transport resumed 2008-11-25 19:13:08,140 INFO [ActiveMQ Task - FailoverTransport.java:693] Successfully reconnected to tcp://localhost:61616 [Consumer0]transport resumed 2008-11-25 19:13:08,140 INFO [ActiveMQ Task - FailoverTransport.java:693] Successfully reconnected to tcp://localhost:61616 The screenshot after reconnection is: -- View this message in context: http://www.nabble.com/Negtive-MessageCountAwaitingAcknowledge---DispatchedQueueSize-on-JConsole-tp20496111p20679566.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.