We are experiencing an intermittent issue with our Java application which uses the amqp-client-4.1.1 library to connect to our centrally-hosted RabbitMQ server.
Occasionally we find that one of our connection threads is hanging. A thread dump at the time indicates that this thread is waiting within the AMQP Java library. **THIS THREAD NEVER CONTINUES**.
We have set up pro-active monitoring to ensure we catch this scenario, and have to restart our application to recover the hanging thread, which is not a desirable solution.
Relevant stack trace of this thread is as follows:
"Flash Channel Manager" - Thread t@109
java.lang.Thread.State: WAITING
at java.lang.Object.wait(Native Method)
- waiting on <5cee4d61> (a com.rabbitmq.utility.BlockingValueOrException)
at java.lang.Object.wait(Object.java:502)
at com.rabbitmq.utility.BlockingCell.get(BlockingCell.java:49)
at com.rabbitmq.utility.BlockingCell.get(BlockingCell.java:64)
at com.rabbitmq.utility.BlockingCell.uninterruptibleGet(BlockingCell.java:120)
at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36)
at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:412)
at com.rabbitmq.client.impl.AMQConnection.close(AMQConnection.java:999)
at com.rabbitmq.client.impl.AMQConnection.close(AMQConnection.java:918)
at com.rabbitmq.client.impl.AMQConnection.close(AMQConnection.java:902)
at com.rabbitmq.client.impl.AMQConnection.close(AMQConnection.java:894)
at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.close(AutorecoveringConnection.java:216)
at com.touch.clarity.go.app.flash.messaging.channels.FlashChannel.disconnect(FlashChannel.java:429)
at com.touch.clarity.go.app.flash.messaging.channels.FlashChannel.connect(FlashChannel.java:391)
- locked <550e9de> (a com.touch.clarity.go.app.flash.messaging.channels.FlashChannel)
at com.touch.clarity.go.app.flash.messaging.channels.FlashChannel.connect(FlashChannel.java:379)
at com.touch.clarity.go.app.flash.messaging.channels.FlashManager$ChannelManager.run(FlashManager.java:393)
- locked <3fd8b36e> (a java.util.HashMap)