Sep 10th, 2010, 10:27 AM
Use of heartbeat on connection factories
I noticed in the source for the SimpleConnectionFactory there's:
//TODO are there heartbeats and/or exception thrown if a connection is broken?
I'm trying to address a scenario where the broker goes down temporarily and the consumers that were connected to it start throwing "Attept to use closed connection" exceptions instead of recognizing that the broker went down and trying to re-establish a new connection.
Setting a heartbeat on the Java client's connectionFactory seems to address this although I'm not clear since I haven't found conclusive documentation on it.
Do you know if this is the intended use of a heartbeat? Is there a plan to add it to the Spring AMQP connection factory implementations?