Last Will and Testament information in a cluster

Question

If a node within a HiveMQ cluster suddenly fails, forcing all connected clients to that node to re-connect, will other nodes in the cluster send out the LWT messages?

Answer

Yes. Last will information is replicated within a HiveMQ cluster and the LWT/WILL does trigger in the described scenario.

MQTT 5 does introduce the "WILL Delay" feature which allows for a set amount of time to pass before the Last Will and Testament (LWT) message is sent by the broker. This delay can be helpful in scenarios where there is a temporary connection loss that is quickly resolved, as it gives the client time to reconnect before the LWT message is sent. This can prevent false alarms and unnecessary actions triggered by the LWT message.