Re: [rabbitmq-users] PRECONDITION_FAILED - inequivalent arg 'durable'

9,476 views
Skip to first unread message

Michael Klishin

unread,
Jan 5, 2017, 3:25:34 AM1/5/17
to rabbitm...@googlegroups.com, Henri Adiv
The queue already exists with a different `durable` property. Either change your declaration
properties to match what's already there or delete the queue and re-run your code. 

On 5 January 2017 at 16:15:33, Henri Adiv (hen...@gmail.com) wrote:
> Hi
> i have a case which is not cleared to me, since i'm using a non durable
> queue, and trying to receive a message on it. what am i doing wrong?
> using this code:
>
> Bus.Advanced.QueueDeclare("Test1", durable: false, autoDelete: true);//Declare
> a new queue - non existing
>
> Bus.Advanced.Bind(new Exchange("MyExchange"), new Queue("Test1"), "#");
>
> Bus.Receive("Test1", onMessage);
>
>
> private void OnMessage(string f)
> {
>
> }
>
>
>
> i get this error :
>
> Additional information: The AMQP operation was interrupted: AMQP close-reason, initiated
> by Peer, code=406, text="PRECONDITION_FAILED - inequivalent arg 'durable' for queue
> 'Test1' in vhost '/': received 'true' but current is 'false'", classId=50, methodId=10,
> cause=
>
>
> thanks
>
> henri
>
>
>
> --
> You received this message because you are subscribed to the Google Groups "rabbitmq-users"
> group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
> To post to this group, send an email to rabbitm...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Michael Klishin

unread,
Jan 5, 2017, 3:55:00 AM1/5/17
to Henri Adiv, rabbitm...@googlegroups.com
+rabbitmq-users: I do not offer any kind of 1-on-1 support.

Queue parameters don't have to match exchange parameters. When you declare
an exchange or queue that already exists, you must provide matching properties or the declaration will fail
with a channel error 406.

Policies provide an exception to this rule for optional arguments. 

On 5 January 2017 at 16:48:09, Henri Adiv (hen...@gmail.com) wrote:
> Hi Michael
>
> the problem was seems to be related to the fact that i'm trying to create a
> queue which is different in 2 parameters with the binded exchange, auto
> delete and durable.
> is it not allowed to have different queue types to be bound to same
> exchange?
> Henri

Michael Klishin

unread,
Jan 5, 2017, 4:14:19 AM1/5/17
to Henri Adiv, rabbitm...@googlegroups.com
+rabbitmq-users, please do CC the list.

I don't know what Bun#Receive does or what project it is from but it issues a queue.declare
under the hood with different properties. There is no ambiguity in the error message.

Both server logs and a traffic capture [1] should confirm this.

1. https://www.rabbitmq.com/amqp-wireshark.html

On 5 January 2017 at 17:07:41, Henri Adiv (hen...@gmail.com) wrote:
> Hi
>
> the exchange was already exists: with durable = true and autodelete = false
> but queue was deleted by me before running the code(watch the management UI
> to confirm it), and was created with autodelete = true
> queue created during this declare(watch the management UI to confirm it),
> and created succefully
> the problem was only running *receive *on it:
>
> Bus.Receive("Test1", onMessage);
>
> The AMQP operation was interrupted: AMQP close-reason, initiated by
> Peer, code=406, text="PRECONDITION_FAILED - inequivalent arg
> 'auto_delete' for queue 'Test1' in vhost '/': received 'false' but
> current is 'true'", classId=50, methodId=10, cause=
> > > > > To post to this group, send an email to rabbitmq-users@googlegroups.
Reply all
Reply to author
Forward
0 new messages