[rabbitmq-discuss] [Error] PRECONDITION_FAILED
simon at rabbitmq.com
Wed Oct 23 16:10:12 BST 2013
I don't know whether the php client eats the error description or you
just didn't post it, but the PRECONDITION_FAILED is telling you that you
can't declare an exchange with the characteristics you asked for, since
it already exists but with different characteristics. i.e. it might not
be durable, or be of a different type, or might not be auto-delete.
My money's on auto-delete for what it's worth.
rabbitmqctl list_exchanges or the management plugin will let you see
what form the exchange currently takes.
On 23/10/13 13:18, Axansh Sheth wrote:
> I wanted to upgrade AMQP library [php] 0.9 to latest.
> I have updated that and change my Publisher and consumer code.
> In publisher code for 0.9 :
> $this->ex = new AMQPExchange($conn);
> $this->ex->declare($exchange, $type);
> I changed it :
> $this->ex = new AMQPExchange($ch);
> $this->ex->setFlags(AMQP_DURABLE | AMQP_AUTODELETE);
> But i got this error : ncaught exception 'AMQPExchangeException' with
> message 'Server channel error: 406, message: PRECONDITION_FAILED
> If i commented $this->ex->declare();
> then works fine,
> I found this is redeclare problem.
> Shall i comment : $this->ex->declare(); or
> shall i change some thing?
> I do not loose my earlier functionality.
> Please guide me for same.
> Thanks a lot.
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
More information about the rabbitmq-discuss