[rabbitmq-discuss] .NET rabbit heartbeat to keep connections alive
emile at rabbitmq.com
Wed Mar 28 16:58:56 BST 2012
On 28/03/12 14:52, Puru Belagali wrote:
> We are having an issue at the moment to keep connections alive between
> the Rabbit Client and Server across 2 different sites with a
> firewall/load balancer inbetween.
> The Fire wall/Load balancer has an ldle timer of 1 hr after which it
> closes the underlying tcp connection if the channel is inactive for over
> an hour.
> This is causing problems especially when the Client has a subscriber
> listening for messages from a rabbit server behind the firewall.
> We added the connFactory.RequestedHeartbeat = 10; and tested this but
> the connection just seems to close after 10 seconds. It doesn’t seem to
> work. I don’t know if that’s something else needs to be enabled ?
There is nothing else that needs to be enabled - setting the value in
the connection factory as you have done is correct. I'm unable to
reproduce the problem you report though. Using Rabbit v2.8.1 heartbeat
frames are exchanged in both directions between the broker and the C#
May I suggest the use of a protocol analyser or network tracer on both
sides the firewall to confirm what traffic is passed between the client
and the broker? The RabbitMQ Java client includes a tracer that you may
find convenient for this purpose:
Wireshark includes an AMQP dissector and may also be used.
More information about the rabbitmq-discuss