If a consumer dies (its channel is closed, connection is closed, or TCP connection is lost) without sending an ack, RabbitMQ will understand that a message wasn't processed fully and will re-queue it
即: 如果消费者进程挂掉了(channel关闭, connection关闭,或者tcp连接丢失), 没有发回确认信息, RMQ将认为消息没有被处理完, 将重新排队等待分配。
but how?
答案是:通过心跳来监控。
官方文档在这里:https://www.rabbitmq.com/heartbeats.html
摘要如下:
=====================================================================
Detecting Dead TCP Connections with Heartbeats
用心跳监控tcp连接是否丢失
Introduction
介绍
Network can