[rabbitmq-discuss] Java Client Heartbeat

Danielius Jurna danielius.jurna at gmail.com
Wed Sep 29 07:03:42 BST 2010


Hi.
I'm testing the robustness of rabbitmq server/java client on
unreliable network.
It seems that there is a flaw in heartbeat implementatin in java
client.
Here is the scenario.
1. Message producer tries to publish message to server. During this
connection is lost in the network. Client blocks on socket write.
(SocketFrameHandler.writeFrame)
2. Heartbeat implementation tries to send heartbeat message to server.
It also blocks in SocketFrameHandler.writeFrame on synchronized
statement.
3. The whole client blocks until tcp timeouts. This takes ages.

I cannot see how current implementation can work correctly until you
have separate heartbeat thread.
Is there a plan to improve java client robustness on unreliabile
networks?


More information about the rabbitmq-discuss mailing list