[rabbitmq-discuss] Dangling Connection

Tim Watson tim at rabbitmq.com
Fri Dec 21 12:18:17 GMT 2012


Hi

On 21 Dec 2012, at 11:37, PSL 88506 wrote:

> I'm very sorry, It is typo - It is not connection , Its connected.
> I apologize , please consider your former comment - "2 client instances running on [the] same server, *connected* to differed RabbitMQ brokers"
> 
> I'm very sorry for confusing.

No problem, I just wanted to clarify.

> Thank you very much for your reply. This is helping us a lot.
> 

Good - that's why we have the list! :)

> One more clarification:
> 
> We have connection pool at client side, and If a  graceful shutdown is done for server (RabbitMQ) or server(RabbitMQ) is stopped abruptly -  
> In both scenarios can we ensure that heartbeat with close all connections. 
> 

Yes that will be fine. If you have a client that is connected and you do a graceful shutdown, the broker will notify the client that it's going away. Sometimes, network interruption can mean that the notification to close the connection takes a long time to get to the client (or gets lost altogether if the link disappears). The other scenario is, as you pointed out, an abrupt shutdown where the broker doesn't even send the connection a close notice. The heartbeat implementation on the client side will notice that the broker is not responding to the heartbeat request and will close the socket (and throw an exception). The pool can then decide what to do about those closed connections (attempting to re-establish them or whatever).

Hope that helps!

Cheers,
Tim


More information about the rabbitmq-discuss mailing list