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.正确格式:

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

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

 

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

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这个错误信息中提到了"channel error; protocol method: #method<channel.close> reply-code=404"。通常,这种错误表示RabbitMQ通道在执行某个协议方法时发生了错误。协议方法是RabbitMQ提供的一种操作方式,用于在通信过程中执行特定的动作或操作。 在这种情况下,错误代码404表示"NOT_FOUND",即找不到相关的资源或操作。可能是由于消费者在确认消息时使用了无效的交付标签或者执行了未知的操作方法。 要解决这个问题,你可以检查以下几个方面: 1. 检查消费者代码,确保在确认消息时使用了正确的交付标签。 2. 检查消费者代码,确保没有执行未知的操作方法。 3. 检查RabbitMQ配置,确保队列、交换机等相关资源存在且正确配置。 如果以上步骤都没有解决问题,你可能需要进一步查看RabbitMQ的日志以获取更详细的错误信息,以便找到解决方案。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [Channel shutdown: channel ... protocol method: #methodchannel.close(reply-code=406, reply-text=](https://blog.csdn.net/qq_18671415/article/details/112037977)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [Channel shutdown: channel ... protocol method: #methodchannel.close(reply-code=404, reply-text=](https://blog.csdn.net/m0_51113232/article/details/127719865)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [计算机网络第六版答案](https://download.csdn.net/download/u014715363/8804135)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值