wanna give 5.9 a try? http://activemq.apache.org/activemq-590-release.html
On Wed, Dec 11, 2013 at 12:16 AM, liangwb2001 <liangwb2...@gmail.com> wrote: > I think this is a multi thread sync bug of ActiveMQConnection, for example: > ExceptionListener exceptionListener = new ExceptionListener() { > public onException(JMSException exception){ > conn.close; > } > }; > > Thread main : > time 1. create a connection successfully; > time 2. connection.setExceptionListener(exceptionListener); > time 3. activemq server shutdown; > time 4. send a message, learn activemq down state; > > Thread onAsyncException()'s new Runnable -- ActiveMQ Connection Executor: > unconnected : > time 5. ActiveMQConnection.close(); > time 6. throws javax.jms.JMSException on > ActiveMQConnection.doSyncSendPacket(); > > Thread onException()'s new Runnable -- ActiveMQ Connection Executor: > unconnected : > time 7. do nothing because of (!closing.get() && !closed.get()) == false; > > So, ServiceSupport.dispose(this.transport) wouldn't be inoked, > FailoverTransport.reconnectTask wouldn't be shutdown; > ActiveMQ Task wakeup for ever, and doReconnect() returned at > ((connectedTransport.get() != null && !doRebalance) || disposed || > connectionFailure != null), > and high cpu usage; > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/activemq5-5-client-high-cpu-usage-tp4675314p4675349.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. -- Christian Posta http://www.christianposta.com/blog twitter: @christianposta