消费消息
每条消息有3种结果:消费成功(FIN)、消费失败(REQ)、消费超时(TIMEOUT)。若nsqd进程意外退出,则内存中以及还没来得及刷入硬盘的消息都会丢失。
若消息在msg_timeout内没消费,则会自动重新入队列REQ;若消息在max_msg_timeout内还没消费,则会记为TIMEOUT
nsqadmin参数
Message Queues:
- Depth: Current sum of messages in memory on disk (i.e. the “backlog” of messages pending delivery) 当前消息数:内存和硬盘转存的消息数.
- In-Flight: Current count of messages delivered but not yet finished (
FIN
), requeued (REQ
) or timed out 当前未完成的消息数:包括发送但未返回FIN/重新入队列REQ/超时TIMEOUT 三种消息数之和. - Deferred: Current count of messages that were requeued and explicitly deferred which are not yet available for delivery. 当前重入队列但还没重新发送消息的数量,这个字段作用是?
Statistics:
- Requeued: Total count of messages that have been added back to the queue due to time outs or explicit requeues. 重入队列数(或者因为超时重入队列,或者