Last-Wills
A last will is a regular application message, but the client can set up and send it while connecting to the broker. The broker will distribute this last-will only when the client goes offline and the last-will's Delay Interval expires.
Creating a Last-Will¶
A last-will can be created in the connect packget builder callback using ConnectPacketBuilder's WithLastWill and a new LastWillBuilder. The following code creates a last-will that will be published to the "client/last-will"
topic 60
seconds after the client gone offline.