Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 RabbitMQ(集群)并使用 Node.js 客户端(node-amqp - https://github.com/postwait/node-amqp)连接到它。RabbitMQ 文档指出,处理故障转移场景(集群的节点故障)应该由客户端处理,这意味着客户端应该检测到故障并连接到集群中的另一个节点。支持这种故障转移平衡的最简单方法是什么。node-amqp 客户端是否支持这个?任何示例或解决方案将不胜感激。
谢谢。
node-amqp 支持连接对象中的多个服务器主机。所以输入 host: 作为一个主机数组(不幸的是只有主机部分接受一个数组,所以端口和身份验证等其他参数必须在你的兔子服务器上匹配)。