[rabbitmq-discuss] Queue with x-expires not expires after timeout

Dave Curylo curylod at asme.org
Fri Aug 3 18:58:25 BST 2012


Regarding your consumers, when using the .NET client, you should make sure to set the RequestedHeartbeat property on your ConnectionFactory to a non-zero value.  If you don't do this, then should a process die without a chance to clean up the connection, it may never get disconnected and you will have to close the connections manually either through the management web interface or rabbitmqctl.  Rabbit seems to hold on to the connections if you don't do this.

Here is a helpful script if you have a lot of connections and find it tedious to close them using the web UI.

for c in `rabbitmqctl list_connections peer_address pid | grep $peerToDisconnect`;
if [ $c != $peerToDisconnect ];
then rabbitmqctl close_connection $c "Orphaned - disconnecting";

On Aug 3, 2012, at 1:10 PM, Thiago Burgo Belo wrote:

> Matthias, 
> Has 2 consumers, but this is more strange, because I closed all connections with Rabbit (.NEt Client) and the consumers are Idle since 2012-08-02 15:05:56, the consumers will never die?
> Note 1:  I already turned off my computer (client) and the consumer keep alive.
> Note 1: I'm using a non default virtual host, something like /myVirtualHost
> See the attachment.
> Thanks, 
> Thiago Burgo
> 2012/8/2 Matthias Radestock <matthias at rabbitmq.com>
> On 02/08/12 20:58, Thiago Burgo Belo wrote:
> My queue with x-expires not expires after timeout, the follow queue was
> created and not accessed since (2012-08-02 14:00), and not expired until
> now.
> Parameters
> x-ha-policy:    all
> x-expires:      9000
> arguments:      
> x-match:        any
> durable:        true
> Exclusive owner None Status Idle since
> 2012-08-02 16:16:58
> Does the queue have a consumer? From http://www.rabbitmq.com/extensions.html#queue-leases
> <quote>
> "Unused means the queue has no consumers, the queue has not been redeclared, and basic.get has not been invoked for a duration of at least the expiration period."
> </quote>
> Matthias.
> <rabbit.png>_______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120803/72c986ee/attachment.htm>

More information about the rabbitmq-discuss mailing list