Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Question

...

  • Take-Over?

  • When the LWT is not being triggered on Client

...

  • Take-Over?

Answer

...

As per spec, the will message is published once either the will delay is reached or the session expires.
The shorter of the two is chosen here.

The Server delays publishing the Client's Will Message until the Will Delay Interval has passed or the Session ends, whichever happens first.

Will publishes should not be sent if Session Expiry and Will Delay are both >0.

...

Will Message is sent when...

Will Message is not sent when...

An I/O error or network failure detected by the Server.

The Network Connection is closed normally by the Client sending a DISCONNECT packet with Reason Code 0x00.

The Client fails to communicate within the Keep Alive time.

The Will Flag is set to 0.

The Client closes the Network Connection without first sending a DISCONNECT packet with Reason Code 0x00 (Normal disconnection).

A new Network Connection for the ClientID is opened before the Will Delay Interval has elapsed.

The Server closes the Network Connection without first receiving a DISCONNECT packet with a Reason Code 0x00 (Normal disconnection).

The Server has deleted the Will Message on receipt of a DISCONNECT packet with Reason Code 0x00 (Normal disconnection) or before the Will Delay Interval has elapsed.

The Will Delay Interval has elapsed and the Session ends.

The Server experiences failure or shutdown and defers publication of Will Messages.

A new Network Connection to this Session is made before the Will Delay Interval has passed.

The Will Delay Interval is absent or set to 0.

A Client Identifier of an existing Network Connection to the Server is used, and Clean Start is set to 1.

Clean Start is set to 0 and the Will Delay Interval is greater than 0.