Hi Tim,<div><br></div><div>Thanks, I found the heartbeat property on the connection class. connectionFactory.RequestedHeartbeat&nbsp;&nbsp; I didn't realize it was default off (0) and will test with a value.</div><div><br></div><div>-Mark</div><div><br></div><div><span style="color: rgb(0, 0, 0); font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; ">Hi Mark,</span><br style="color: rgb(0, 0, 0); font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; "><br style="color: rgb(0, 0, 0); font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; "><span style="color: rgb(0, 0, 0); font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; ">You should try enabling AMQP heartbeats, as this should resolve the issue of detecting the connection is being closed.&nbsp;</span>&nbsp;<br><br>On Thursday, August 2, 2012 9:58:51 AM UTC-5, Mark Ward wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Hi,<div><br></div><div>I am performing tests to a server across the internet. &nbsp;During the night our firewall is rebooted and it appears the basic consumer is not detecting this and does not throw any exceptions on the connection. &nbsp;When I arrive to the office each morning the subscriber client is still running and in the block state waiting for a message. &nbsp;If I send messages to the server the client will not receive messages unless I restart the client. &nbsp;The client works all day long as I push millions of messages through for testing. &nbsp;It is after the firewall reset that the client does not continue to work or fail out. &nbsp;This does appear to be a repeatable issue for the past two days it has performed this same issue. &nbsp;I am going to continue tonight to see if it repeats.</div><div><br></div><div>Is there something I need to enable to have the client detect the connection closure? &nbsp;The testing I have manually performed on closing the network connection, shutting down the server, restarting the server have all caused the client to properly throw and exception that the connection was closed. &nbsp;It is only when the firewall resets that the client does not detect the failed connection.&nbsp;</div><div><br></div><div>This is the .NET client connecting to the port 5672. &nbsp;It is not using SSL.</div><div><br></div><div>below is the example code I am working with.</div><div><br></div><div><div>var connectionFactory = new ConnectionFactory();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; connectionFactory.HostName = hostName;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; connectionFactory.Port = port;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IConnection connection = connectionFactory.<wbr>CreateConnection();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IModel channel = connection.CreateModel();</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QueueingBasicConsumer consumer = new QueueingBasicConsumer(channel)<wbr>;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String consumer_tag = channel.BasicConsume("<wbr>QueueOne", false, consumer);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.WriteLine("ctrl+c to exit");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while (true)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BasicDeliverEventArgs evt_args = (BasicDeliverEventArgs)<wbr>consumer.Queue.Dequeue();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IBasicProperties msg_props = evt_args.BasicProperties;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; string message = Encoding.UTF8.GetString(evt_<wbr>args.Body);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; channel.BasicAck(evt_args.<wbr>DeliveryTag, false);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.WriteLine("Message Body: " + message);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; channel.Close();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; connection.Close();</div></div></blockquote></div>