MQTT Last Will Messages: What an Offline Alert Really Indicates
An MQTT dashboard can flag a device as offline within seconds of losing its broker connection, which is useful for devices that hold persistent connections. However, the offline message is narrow evidence: it indicates that a client connection ended ungracefully, not that a NAS lost power, a service stopped, or the network failed. Such alerts typically come from MQTT's Last Will and Testament (LWT) feature, which lets a client register a message the broker publishes if the connection drops unexpectedly. The article advises writing down exactly what an alert shows, since a claim like "client connection was lost" is testable while broader conclusions need more evidence. It also notes that graceful disconnects normally suppress the will, and that keepalive settings, delivery delays, and retained messages can affect when alerts arrive and what subscribers see.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in