RabbitMQ—常见报错

1、异常:code=320, text="CONNECTION_FORCED - broker forced connection closure with reason 'shutdown' "

原因:队列服务端重启后,队列发布端断开了接口,无法再次发送消息

解决:发送端设置断开连接后自动启动属性,默认为断开后每隔五秒钟重试连接

 var factory = new ConnectionFactory();

factory.AutomaticRecoveryEnabled = true;   //设置端口后自动恢复连接属性即可

 

2、

你可能感兴趣的:(#,MQ)