[rabbitmq-discuss] Use of QueueDeclarePassive generates errors in log

Michael Klishin mklishin at gopivotal.com
Wed Jun 4 09:04:07 BST 2014


 On 4 June 2014 at 04:50:02, Andrius Norkaitis (andnrk at gmail.com) wrote:
> > QueueDeclarePassive(QueueName) generated error in log file.  
> E.g.
>  
> if queue not exist, it writes:
>  
> =ERROR REPORT==== 4-Jun-2014(http://airmail.calendar/2014-06-04%2012:00:00%20GMT+4)::03:33:00  
> ===
> connection <0.26865.9>, channel 3 - soft error:
> {amqp_error,not_found,
> "no queue 'xxxx' in vhost '/'",
> 'queue.declare'}

Which is entirely expected.

> If it exist, it writes:
>  
> =ERROR REPORT==== 4-Jun-2014(http://airmail.calendar/2014-06-04%2012:00:00%20GMT+4)::03:33:05  
> ===
> connection <0.26865.9>, channel 3 - soft error:
> {amqp_error,resource_locked,
> "cannot obtain exclusive access to locked queue 'xxxx' in vhost  
> '/'",
> 'queue.declare'}

The message says that you have 2 connections trying to use a queue
declared as exclusive. Use a non-exclusive queue and there will be no error.
 
> How to disable error logging when using this function? Maybe  
> there is new way to check queue exist?

There is no but you can simply declare the queue with the same arguments
instead of checking if it exists.
--  
MK  

Software Engineer, Pivotal/RabbitMQ


More information about the rabbitmq-discuss mailing list