AMQP close-reason, initiated by Peer, code=406

错误:

AMQPclose-reason, initiated by Peer, code=406, text="PRECONDITION_FAILED -inequivalent arg 'durable' for queue 'hello' in vhost '/': received 'false' butcurrent is 'true'", classId=50, methodId=10, cause=

错误代码:

HTTP Status 406 (不接受) 
->无法使用请求的内容特性响应请求的网页。

错误截图:

AMQP close-reason, initiated by Peer, code=406AMQP close-reason, initiated by Peer, code=406

错误原因:

提示信息显示定义队列的Durable是‘false’但当前服务器上的是‘true’,所以AMQP被中断了,打开管理中心的网页一看果然(如下图),于是将代码中的false改成true,让两者保持一致,便解决此问题。

AMQP close-reason, initiated by Peer, code=406AMQP close-reason, initiated by Peer, code=406

总结:

声明同一个队列时,durable, auto_delete,passive等参数都要保持一致

上一篇:Android学习路径图


下一篇:每天一个linux命令(42):kill命令