AMQP错误 Uncaught AMQPQueueException: Server channel error: 406, message: PRECONDITION_FAILED

如何处理错误Uncaught AMQPQueueException PRECONDITION_FAILED

Declare queue "micqueue" ... PHP Fatal error:  Uncaught AMQPQueueException: Server channel error: 406, message: PRECONDITION_FAILED - inequivalent arg 'durable' for queue 'micqueue' in vhost '/': received 'true' but current is 'false' in /var/www/api/src/Lib/Service/Amqp.php:114
Stack trace:
#0 /var/www/api/src/Lib/Service/Amqp.php(114): AMQPQueue->declareQueue()
#1 /var/www/api/bin/init_amqp(40): Lib\Service\Amqp->declareQueue('micqueue', 2)
#2 {main}
  thrown in /var/www/api/src/Lib/Service/Amqp.php on line 114

如何修复


AMQPQueue->delete($flag);
 ```
 
其实这个问题很简单的,就是queue的durable在初始化的时候就已经生成了,不能再次修改,只有将这个queue删除掉,才能正常运行,或者修改queue的durable为原来的。
 

0 comments

To reply to the article, please Login or registered