[rabbitmq-discuss] Heartbeat vs timeout in .NET code

Arun Rao arunrao.seattle at gmail.com
Mon Apr 14 20:26:32 BST 2014

Sorry guys for extending this topic further and further. What if I disabled

*On the producer side *- When a producer tries to send a message, .NET
client code will catch Connection Shutdown exception and try to reinitiate
the connection. Depending on the traffic on the connection, this could be
caught within a second if the connection was active sending data or within
several minutes if the connection was idle.

*On the consumer side* - How frequently does the consumer check the queue
for messages? I thought that even without heartbeats Consumers will catch
the following exception:

System.IO.IOException: Unable to read data from the transport connection:
An existing connection was forcibly closed by the remote host. --->
System.Net.Sockets.SocketException: An existing connection was forcibly
closed by the remote host
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)
   --- End of inner exception stack trace ---
   at RabbitMQ.Client.Impl.Frame.ReadFrom(NetworkBinaryReader reader)
   at RabbitMQ.Client.Impl.SocketFrameHandler_0_9.ReadFrame()
   at RabbitMQ.Client.Impl.ConnectionBase.MainLoopIteration()
   at RabbitMQ.Client.Impl.ConnectionBase.MainLoop()


On Mon, Apr 14, 2014 at 8:46 AM, Michael Klishin <mklishin at gopivotal.com>wrote:

> On 14 April 2014 at 19:41:44, Arun Rao (arunrao.seattle at gmail.com) wrote:
> > > Are there any use cases when RabbitMQ .NET/Java client code
> > closes connection due to missed heartbeats?
> Every correct client and RabbitMQ must close TCP connection when 2
> heartbeats
> are skipped by the peer.
> --
> MK
> Software Engineer, Pivotal/RabbitMQ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140414/05bef7d4/attachment.html>

More information about the rabbitmq-discuss mailing list