[rabbitmq-discuss] Java Client Heartbeat

Rob Harrop rob at rabbitmq.com
Mon Oct 11 19:15:52 BST 2010


I just pushed a patch up to mercurial on branch bug23357 that moves the heartbeat on to a separate thread.

Please can you try this for your use case and let me know how it works out.



On 29 Sep 2010, at 07:03, Danielius Jurna wrote:

> 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?
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

More information about the rabbitmq-discuss mailing list