[rabbitmq-discuss] queue is locked exclusively

Matthias Radestock matthias at lshift.net
Tue Aug 4 12:40:37 BST 2009


Rajesh,

Reddy, Rajesh (GPT EMEA) wrote:
> there is something going wrong and trying to resubscribe on
> an existing queue.
> I have added some debug info to the log files, so may be I will get more
> information regarding why is this happening.

Is the client naming the queue or is it getting the server to generate a
name for it?

The reason I am asking is that if you re-use the same queue name then
there is an unavoidable race condition which might trigger the
RESOURCE_LOCKED error. Specifically, if the connection terminates
non-cleanly, e.g. it gets dropped due to a client or network failure,
and you then immediately reconnect, the auto-deletion of resources of
the old connection may not have happened yet.

I reckon it is unlikely you'd run into this, since the auto-deletion
happens quite quickly, but it is a possibility.


Regards,

Matthias.




More information about the rabbitmq-discuss mailing list