<div dir="ltr">Hi,<div><br></div><div>I wanted to upgrade AMQP library [php] 0.9 to latest.</div><div>I have updated that and change my Publisher and consumer code.</div><div><br></div><div>In publisher code for 0.9 :</div><div><br></div><div><div>$this->ex = new AMQPExchange($conn);</div><div>$this->ex->declare($exchange, $type);</div></div><div><br></div><div>I changed it :</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$this->ex = new AMQPExchange($ch);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$this->ex->setName($exchange);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$this->ex->setType($type);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$this->ex->setFlags(AMQP_DURABLE | AMQP_AUTODELETE);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$this->ex->declare();</div></div><div><br></div><div>But i got this error : ncaught exception 'AMQPExchangeException' with message 'Server channel error: 406, message: PRECONDITION_FAILED </div><div><br></div><div>If i commented $this->ex->declare(); </div><div>then works fine,</div><div><br></div><div>I found this is redeclare problem.</div><div><br></div><div>Shall i comment : $this->ex->declare(); or </div><div>shall i change some thing?</div><div><br></div><div>I do not loose my earlier functionality.</div><div><br></div><div>Please guide me for same.</div><div><br></div><div>Thanks a lot.</div></div>