[rabbitmq-discuss] Queue Re-declaration

Brian Sullivan bsullivan at lindenlab.com
Thu Mar 26 19:00:35 GMT 2009


Hi Matthias,

For the workaround to periodically check if the queue still exists, is  
the most efficient (or only) way to do this to continually re-declare  
the queue?  I know it's meant to be an assertion, but it still looks  
very strange in my code, and I am curious if there is a lighter way to  
do this.

Thanks,
Brian

On Mar 26, 2009, at 12:34 AM, Matthias Radestock wrote:

> Brian,
>
> Brian Sullivan wrote:
>> Also - what is the expected behavior if you delete a queue  
>> (externally using a different client) that a consuming application  
>> has a binding to?  In my testing, I don't believe I get any errors  
>> back to the client, it just seems to be silently listening for more  
>> messages that will never come.  This is using the Java client.
>
> That is the expected behaviour in AMQP 0-8.
>
> In 0-9-1 the notion of queue exclusivity extends to *all* queue  
> operations, not just basic.consume. So if a client declares a queue  
> as exclusive then no other client can do anything with that queue at  
> all, including deleting it.
>
> The problem you describe will still exist for non-exclusive queues  
> though. Arguably a queue should inform consumers when it is  
> disappearing. AMQP does not support this, and I don't know of any  
> plans of adding such a feature. One possible workaround is for  
> clients to periodically check whether the queue still exists.
>
>
> Regards,
>
> Matthias.





More information about the rabbitmq-discuss mailing list