[rabbitmq-discuss] [Error] PRECONDITION_FAILED

Axansh Sheth axansh at gmail.com
Wed Oct 23 13:18:25 BST 2013


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131023/361f021d/attachment.htm>

More information about the rabbitmq-discuss mailing list