小白学mq之Rabbitmq AlreadyClosedException异常记录

 com.rabbitmq.client.AlreadyClosedException: channel is already closed due to channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'durable' for queue 'test_data' in vhost '/': received 'true' but current is 'false', class-id=50, method-id=10

翻译过来就是exchange的durable已经true了不能改为false。

所以使用的时候要注意如果exchange和queue的durable已经定义好了是不能更改的。

除非客户端删掉exchange,queue然后重新启动。

猜你喜欢

转载自blog.csdn.net/hs_shengxiaguangnian/article/details/118612775