SpringAMQP声明队列时报错:Channel shutdown: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED...

 完整错误信息:

Channel shutdown: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'x-dead-letter-routing-key' for queue 'simple.queue' in vhost '/': received the value 'simple' of type 'longstr' but current is none, class-id=50, method-id=10)

 错误原因:

  RabbitMQ中已存在这个队列,但在启动的项目中对这个队列的属性进行了修改。RabbitMQ中的队列一经声明,其属性不可修改。

解决方法:

  删除该队列并重新声明

posted @ 2023-03-15 12:17  Guardian0769  阅读(3586)  评论(0)    收藏  举报