Question
When is the LWT being triggered on Client Takeover? When the LWT is not being triggered on Client Takeover?
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.