Practical use.
WHAT A LAST WILL MESSAGE IS
A message the broker publishes if a device disconnects unexpectedly.
WHY IT MATTERS
It is how the system learns a device has gone, without waiting for a timeout elsewhere.
WHAT TO SET IT TO
An offline status on the device's status topic.
WHAT KEEP-ALIVE CONTROLS
How often the device must communicate to be considered connected.
WHAT SETTING IT TOO LONG CAUSES
Slow detection of failure.
WHAT SETTING IT TOO SHORT CAUSES
Unnecessary traffic and power use.
WHAT SESSIONS CONTROL
Whether subscriptions and undelivered messages survive disconnection.
WHAT PERSISTENT SESSIONS PROVIDE
Messages queued while a device was away.
WHAT THEY RISK
Large backlogs on reconnection.
WHAT TO CONFIGURE
Limits on queued messages.
WHAT SECURITY REQUIRES
Encrypted connections Per-device credentials Authorisation restricting which topics each device may use
WHY TOPIC AUTHORISATION MATTERS
Without it, any device can publish as any other, or read everything.
WHAT TO RESTRICT EACH DEVICE TO
Its own topics, only.
WHAT TO MONITOR
Connection churn, which indicates unstable devices or networks.