惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
云风的 BLOG
云风的 BLOG
小众软件
小众软件
雷峰网
雷峰网
博客园 - 【当耐特】
V
V2EX
WordPress大学
WordPress大学
IT之家
IT之家
Last Week in AI
Last Week in AI
罗磊的独立博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
Visual Studio Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
有赞技术团队
有赞技术团队
The Cloudflare Blog
Jina AI
Jina AI
博客园 - 司徒正美
阮一峰的网络日志
阮一峰的网络日志
博客园 - 聂微东
大猫的无限游戏
大猫的无限游戏
博客园 - 三生石上(FineUI控件)
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

博客园 - PanPan003

AI coding - rewind、undo 撤销操作 如何省token? - 项目 知识 固化 如何省token?--- RTK ,input 数据压缩 如何省token?--- ignore文件 如何省token?--- token 用量统计 如何省token? - 何时开启新session? 如何省token? - 更便宜的模型 处理低风险任务 如何省token?-- 如何提问?避免直接粘贴 大段文件 如何省token?- Plan ,任务拆分,从小模型开始 如何省token?-rewind(todo) 如何省token?- handoff (todo) 如何省token? - compact,压缩上下文 Skill - superpowers skill - mattpocock OpenCode 安装 claude code 安装 npm config AI - coding - links/summary SSH 本地端口转发 --- VM中ubuntu service 可被 Windows 访问 内网穿透 - devtunnel Linux 虚拟机 反向代理 - 到宿主机 - decimal, double在 c#中的区别 python environment settings xUnit Theory: Working With InlineData, MemberData, ClassData docker network - container networking KEDA — Kubernetes Based Event Driven Auto scaling(转载) rabbit MQ —— ha-sync-mode. message 同步/ 丢失 in new pods rabbit MQ —— ha-mode, message 同步策列:所有nodes or one nodes 博文阅读密码验证 - 博客园 Kubernetes hpa
RabbitMQ _ How to Close a Channel
PanPan003 · 2023-04-28 · via 博客园 - PanPan003

https://low-orbit.net/rabbitmq-how-to-close-a-channel

RabbitMQ How to Close a Channel

If you have found your way to this page you are probably wondering how to close a channel in RabbitMQ. Channels should be closed when they are no longer in use. There are multiple different ways of going about doing this that we are going to cover.

To close a RabbitMQ channel do one of the following:

  • Kill the corresponding consumer.
  • Close the channel from within your code: channel.close()
  • Close the associated connection from within your code: connection.close()
  • Use the CLI command: rabbitmqctl close_connection CONNECTION-NAME “my message”
  • Click on the button in the web GUI to close it.

Programmatically Close a RabbitMQ Channel

Option 1: Close Channel

A channel can be programmatically closed like this:

channel.close()

Option 2: Close Connection

All channels on a connection will be closed when you close that connection. You can close a connection programmatically like this:

connection.close()

Using the CLI

You can close a channel from the CLI by closing it’s connection.

To close a channel using the CLI you will first need to find the channel and it’s associated connection. Use the following command to list out channels and connections.

rabbitmqctl list_channels connection

You can close the channel’s connection using the following command. You need to specify the connection which we found previously. The last parameter is a message explaining why the connection is being closed. This will be included in the error message that is output by the consumer.

rabbitmqctl close_connection "<rabbit@zippy-zap.1608598465.5412.0
>" "go away"