I was wondering if folk out there had some useful ideas about how to poll devices such as ESP chips to ensure that they are still live via MQTT.
I am in the process of writing something involving a timer which sends out a "What's your status" message to all registered devices and then waits a while to see if a reply is received or not, but I was wondering if there were more elegant techniques that people were aware of.
You can do something similar from B4R. Use a timer to send a "ping" topic every 5 seconds. If no ping was received after 10 seconds then the client is not available.