Glossary Updates12 new terms added to the glossaries · October 2, 2026, 22:44 CEST
AI TechDocKnowledge

Glossary · Industrial communication

Last will and testament (MQTT)

Also known as: LWT, Last will, Will message

German: Last Will (MQTT)

In MQTT, the last will and testament is a will message that a client registers with the broker when it connects and that the broker publishes on the client's behalf to a defined topic if the connection ends without a normal disconnect, for example after a network failure or a missed keep-alive.

  • Industrial communication
  • Standards

In one sentence

An MQTT last will is a message a client leaves with the broker, which publishes it if the client disconnects unexpectedly.

Example

Each edge gateway on a packaging line registers the will message offline on plant1/line3/palletizer/status, retained; when its network link fails, the broker publishes it and the MES marks the palletizer's data as stale.

How it applies

  • Design: A common pattern combines the will with a retained status topic: the client publishes online after connecting, the will publishes offline when it disappears. Sparkplug B uses the will for its death certificates.
  • Timing: The broker only notices a silent client after the keep-alive interval (1.5 times the value) has passed. MQTT 5.0 adds a will delay interval, so a short reconnect doesn't trigger the will.
  • Limits: The will reports a lost connection, not the state of the machine. It says nothing about whether the machine is still running, and it is no substitute for a Safety function or a monitored Heartbeat where reaction times matter.
  • Documentation: The documentation team documents the will topic, payload, QoS and retain setting, the keep-alive and will delay intervals, and how consumers should react.

By knowledge.aitechdoc.world · Published September 28, 2026 · Last reviewed

Source: OASIS, MQTT Version 5.0, section 3.1.2.5 Will Flag and 3.1.3.2 Will Properties

Definitions follow the cited standards and specifications. Where a source is a copyrighted publication, such as an ISO, IEC or EN standard, the definition is a close paraphrase, not a verbatim quotation, so as not to infringe copyright. We recommend reading the original publication. The sections “How it applies” are editorial commentary by AI TechDoc Knowledge and are not part of any standard.

Seen a mistake? Send us a note!