Closed laushunyu closed 2 years ago
This is working as intended, if your handlers block we expect back pressure to propagate to nsqd
.
There is no way to find out why nsq client is 0. I think it is necessary to print something when blocking handler cause client offline. It makes developer know he wrote a bug.
Do:
Test Code:
For example, msg stuck in handler. When deadline reach "msg_timeout", nsqd will resend it to client immediately. When client conn get the resend msg, will invoke delegate's OnMessage method, then consumer will stcuk in sending msg to full incomingMessages channel. After no response of 2 "heartbeat" msg, nsqd belive client disconnected. Then do:
Get resp: