Channel shutdown: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=

解决方案:

1.看key那里是否写错,要key=”#.chin”,而不是key={“#.chin”},不要加花括号 

2.要加 type = ExchangeTypes.TOPIC

3.正确格式:Channel shutdown: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=

最重要的是,在在MQ的页面,该交换机type为direct,要进入页面将交换机删除,然后重启程序。

Channel shutdown: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=

最开始,我的itcast.topic的type是direct ,然后点击itcast.topic,进入页面,滑到底部

Channel shutdown: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=

 

按照图片删除交换机,然后重新运行程序就可以了

本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://net2asp.com/bd3da9bf0a.html