rabbitmq2 - Serbipunk/notes GitHub Wiki

ideas of web table

https://stackoverflow.com/questions/31915773/rabbitmq-what-are-ready-and-unacked-types-of-messages

  • Ready A message is waiting to be processed.
  • prefetch size When a consumer connects to the queue it gets a batch of messages to process. The amount is prefetch size.
  • unacked While this consumer is working on the messages they get the status unacked.

Unacked means that the consumer has promised to process them but has not acknowledged that they are processed.

When the consumer crashed the queue knows which messages are to be delivered again when the consumer comes online.

zombie consumer

https://stackoverflow.com/questions/13417198/rabbitmq-zombie-consumers

rabbitmq好像也有僵尸消费者,大概原因是消费者失去链接,但无法反馈任务失败,所以一直处于处理状态(unacked)。

https://stackoverflow.com/questions/13417198/rabbitmq-zombie-consumers

平台建议是服务器设置心跳帧检测。把僵尸消息检查出来,任务退回队列继续处理。

通过RabbitMQ后台 -> Connections -> overview里找到(需要人工确认)僵尸消费者 -> Force Close关掉。

https://www.rabbitmq.com/heartbeats.html