Why are messages lost? #1544
-
I use nanomq as a message queue service with default configuration, I publish 100000 message after sleep(10) with qos=0, I found "msg lost due to reach the limit of lmq" in logs, the message are lost! So I try to publish a message with qos=1, but found " ACK failed! qos msg XXX not found!" in logs, and at last , "msg lost due to reach the limit of lmq" in logs . Can I use nanomq without lost message? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Nano drops msg if the in-flight queue is full. In your case, Most likely is the subscribe client not able to handle same msg volume/velocity as the Publishing rate. It has nothing to do with QoS, and ack will failed if Other side(your sUB client) is not able to send ACK in time, So that previous packet id is overwrite by new coming msg In this case, suggest you extend “max_mqueue_len”, by default it is 2048, you can have 65535 if you don't care memory usage. |
Beta Was this translation helpful? Give feedback.
Nano drops msg if the in-flight queue is full. In your case, Most likely is the subscribe client not able to handle same msg volume/velocity as the Publishing rate. It has nothing to do with QoS, and ack will failed if Other side(your sUB client) is not able to send ACK in time, So that previous packet id is overwrite by new coming msg
In this case, suggest you extend “max_mqueue_len”, by default it is 2048, you can have 65535 if you don't care memory usage.