Channel shutdown: channel error; protocol method: #method channel.close (rep

鲁羽
2023-12-01

【RabbitMq】Channel shutdown: channel error; protocol method: #method<channel.close>(rep


如果觉得本文对你有帮助,可以一键三连支持,谢谢

1、启动springboot 应用报错

Channel shutdown: channel error; protocol method: #method<channel.close>(rep

2、原因

当应用启动时,spring 会去检查注册的队列,跟服务器上的队列配置是否一致,如果不一致,则抛出这个错误

比如你在项目中的配置是

    @Bean(DEAD_LETTER_PROD_CLOSE_ORDER)
    Queue a() {
        Map<String, Object> args = Maps.newHashMap();
        args.put("x-dead-letter-exchange", RabbitMqExchange.Exch
 类似资料: