[rabbitmq-discuss] Flag implemented in exchange.delete but not in queue.delete?

Martin Sustrik sustrik at 250bpm.com
Sat Mar 6 12:22:51 GMT 2010


Peter,

>   I have an interesting problem (I'm using version 1.7.0 of the broker): 
> both the exchange.delete and queue.delete have a if_unused flag. The 
> specs state, that if the if_unused flag is true, then an exchange will 
> only be deleted if it does not have any bindings (basically I don't have 
> to keep track of everything, but simply ask the server to only delete if 
> nobody is using it any more). Now my problem is, that the queue.delete 
> also has such a flag, but alas does nothing (and I also haven't found 
> any infos about it). My reasoning would be that it should do exactly the 
> same thing: if there are exchanges still bound to the queue, it 
> shouldn't be deleted, nonetheless it deletes it. Any ideas why this 
> strange behaviour?

Here's what AMQP documentation says:

       The server SHOULD allow for a reasonable delay between the point
       when it determines that a queue is not being used (or no longer
       used), and the point when it deletes the queue.  At the least it
       must allow a client to create a queue and then create a consumer
       to read from it, with a small but non-zero delay between these
       two actions.  The server should equally allow for clients that may
       be disconnected prematurely, and wish to re-consume from the same
       queue without losing messages.  We would recommend a configurable
       timeout, with a suitable default value being one minute.


Martin




More information about the rabbitmq-discuss mailing list