模拟 RabbitMQ 集群中断

Simulate RabbitMQ cluster outage

实际上我需要 "turn off" 我的 rabbit 集群(其中只有 3 个主机)。我找不到任何命令来关闭它。是否有任何命令可以执行此操作,或者我只需要关闭所有 3 个集群节点?

请问有什么建议吗?

提供的文档 here 应该可以满足您的需求。

但总而言之,

  • 没有"one click"集群关闭
  • 当您关闭每个节点时,您需要记下最后一个启动的节点

When the entire cluster is brought down, the last node to go down must be the first node to be brought online. If this doesn't happen, the nodes will wait 30 seconds for the last disc node to come back online, and fail afterwards. If the last node to go offline cannot be brought back up, it can be removed from the cluster using the forget_cluster_node command - consult the rabbitmqctl manpage for more information.

我绝对建议阅读所提供的 link,因为它提供了非常有用的额外信息,如果在重启过程中出现问题,最好在开始之前阅读而不是试图在运行中消化。