[rabbitmq-discuss] does rabbitmq server close connections?

Alexandru Scvorţov alexandru at rabbitmq.com
Tue Jan 3 14:41:57 GMT 2012


> With 100's of computers connected to rabbitmq with persistent connections,
> would this pose any problems?

Not unless you run out of free file handles.  On normal installations,
it should handle up to thousands of connections without difficulty.  You
could further configure it to support more connections.

> Does it time-out by default?

No.  Connections are not timed out.

> Why use a heartbeat?  Is it to re-establish if the heartbeat fails?

If the network fails between a client and the broker, and there's no
traffic between them at that point, both will think the connection is
still open, even though it isn't.  Heartbeats ensure that both broker
and client are notified fairly quickly if the connection fails.

> Would it be better for clients to close connections and only open a
> connection when necessary?

It depends on your use case.

> For reading messages we need persistent connections.
> But for writing, and I can see how we could potentially only open a
> connection to write a message when required.

For consuming messages *efficiently*, you need persistent connections.
If you only get messages very rarely, you could open a connection, poll
the broker with basic.get and then close the connection.  But, if you
need to consume a lot of messages, you probably want persistent
connections anyway.

Hope this helps.

Cheers,
Alex

On Thu, Dec 29, 2011 at 05:21:26PM -0500, S Ahmed wrote:
> With 100's of computers connected to rabbitmq with persistent connections,
> would this pose any problems?
> 
> Does it time-out by default?
> 
> Why use a heartbeat?  Is it to re-establish if the heartbeat fails?
> 
> Would it be better for clients to close connections and only open a
> connection when necessary?
> 
> For reading messages we need persistent connections.
> 
> But for writing, and I can see how we could potentially only open a
> connection to write a message when required.

> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss



More information about the rabbitmq-discuss mailing list