|MQTT broker disconnection [message #1786325]
||Tue, 01 May 2018 08:31
| dan banit
Registered: May 2018
I'm developing a MQTT client task that connects to a mosquitto broker and I encountered a problem.
If the client doesn't send any messages during the period of the keep alive it must send a PINGREQ packet to the broker to confirm its availability and also make sure the broker is still available.
I was running a stress test between two clients, in which the two clients sent to each other a big amount of messages, in a short interval of time, through a mosquitto broker.
The clients didn't send PINGREQ message because they were already sending other messages, and after 1.5*(keep alive period) the broker disconnected the both two clients.
I assumed it was because the two clients didn't send the PINGREQ and I intentionally edited the code so the two clients will send PINGREQ every keep alive period no matter what, and the problem was solved!! The broker didn'd disconnect any of the clients anymore.
I find this behavior inconsistent with the MQTT protocol.
Will you please enlighten me about this issue.
Powered by FUDForum
. Page generated in 0.02182 seconds