Problem: If everything in MQTT is pubsub but it feels like for Last Will and Testament (LWT) to work there would have to be Long polling from some end?
Question: In MQTT, How does broker know when a client goes off line? And what's the flow on LWT notifying the broker, is it long polling?
Last Will And Testament MQTT clients can register a custom “last will and testament” message to be sent by the broker if they disconnect. These messages can be used to signal to subscribers when a device disconnects.