[rabbitmq-discuss] Blocking Queue - Close connection by client
cfautsch at goodgamestudios.com
Mon Mar 3 08:18:06 GMT 2014
we have following issue with blocking queues:
Once the memory watermark is reached, the connection from the client gets
blocked by the RabbitMQ server and it is no longer possible to publish
If this happens, we are for some time still able to publish messages,
however they remain in the socket's write buffer and are not actually
published until the connection is un-blocked again. Once this buffer is
full, publishing blocks completely.
After some research we found out, that with a newer version of the official
Java client, it is possible to use blocked connection notifications to
react on this situation.
Our prefered reaction would be to close the connection, and re-connect to
another broker. Here however comes the problem: It is not possible to close
the connection to the RabbitMQ, as the method to do so, involves a flush on
the socket before the socket is closed and this is blocked as well.
Is there any possibility for a force-closed on the client side? Or is the
only possibility to open a new connection without closing the old one, and
"let it die"?
Re-writing the SocketFrameHandler would of course also be a possibility,
but one we would (if possible) like to avoid. (see also discussion here :
Additionally, when we see blocking connections occurring, we frequently see
following stack trace in our logs, where we are not absolutely sure where
it comes from, or rather why it occurs
com.rabbitmq.client.ShutdownSignalException: connection error; reason:
Caused by: java.io.EOFException
For information, we are currently using Java client,
com.rabbitmq:amqp-client version 3.1.4
and com.zanox.lib.rabbiteasy version:rabbiteasy-core version 1.2.0, for the
connection handling (SingleConnectionFactory) and publishing.
Thanks in advance for any hint or ideas.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss