小白学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然后重新启动。


版权声明:本文为hs_shengxiaguangnian原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。