eclipse / mosquitto

Eclipse Mosquitto - An open source MQTT broker
https://mosquitto.org
Other
8.6k stars 2.33k forks source link

Mosquitto is not publishing all received message (since Mosquitto 2.0.16) #3056

Open D-r-P-3-p-p-3-r opened 1 month ago

D-r-P-3-p-p-3-r commented 1 month ago

I am experiencing a loss of MQTT messages in the broker (with Mosquitto 2.0.18). What I noticed at first is that clients that had subscribed to a certain topic (QoS 0 or QoS 2) did not receive all messages that were published (QoS 2, not retained) from another client to that topic. After creating network traces I could see that all messages arrived at the broker but some of them were not published. It seems to happen when another publish is received before a previous one was released/completed. I did not experience the problem with Mosquitto 2.0.12.

Setup to reproduce

I added two screenshots from network traces that illustrate the problem:

Edit: The error was introduced in 2.0.16. In 2.0.15 everything still worked fine.

SVH-Powel commented 1 month ago

Could you try to configure the buffer?

https://github.com/eclipse/mosquitto/issues/2887#issuecomment-2135030270

D-r-P-3-p-p-3-r commented 1 month ago

We're using max_queued_messages 200 atm. In the test scenario exactly 3 messages are sent. Thus, 200 should be enough, no?