<div dir="ltr">i met the same problem, but i can't find the way to  fix this. Please show me more detail.<br><br>rgds<br><br>On Saturday, March 2, 2013 12:04:50 AM UTC+7, Kelly Elias wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div>I have a class that connects to RabbitMQ like this: (C# code)</div><div><br></div><div><div>private static ConnectionFactory factory;</div><div>private static IConnection connection;</div><div>private static IModel model;</div><div>private static EventingBasicConsumer consumer;</div></div><div><br></div><div>...</div><div><br></div><div><br></div><div>factory = new ConnectionFactory {HostName = address};</div><div>factory.RequestedHeartbeat = 30;</div><div>connection = factory.CreateConnection();</div><div><br></div><div>connection.ConnectionShutdown += connection_ConnectionShutdown;</div><div><br></div><div>model = connection.CreateModel();</div><div><br></div><div>lock (model)</div><div>{</div><div>    model.ExchangeDeclare(<wbr>EXCHANGE_NAME, "topic");</div><div>    queueName = model.QueueDeclare();</div><div>    consumer = new EventingBasicConsumer();</div><div>    consumer.Received += consumer_Received;</div><div>    model.BasicConsume(queueName, true, consumer);</div><div>}</div><div><br></div><div>It all works fine. If I unplug my network connection and wait that 30 seconds for the heartbeat the code will realize it's no longer connected and attempt to reconnect by running the code above again. I don't get any errors, but after the re-connection I never get a message from RabbitMQ.</div><div><br></div><div>I've tried to dispose the objects I'm using but if I try with the connection it hangs and never returns.</div><div><br></div><div>Any ideas what I can try?</div><div><br></div><div><br></div><div>I'm using server version 2.4.1<br></div><div><br></div></blockquote></div>