{"id":"61aee591-9de5-40de-beb1-aec94c1f55ec","task":"Configure an MQTT 5 client so its subscriptions and queued messages survive a short network drop without starting a brand-new session","domain":"docs.oasis-open.org","steps":["Set the CONNECT packet's Clean Start flag to false so the broker resumes prior session state rather than discarding it","Set the Session Expiry Interval property (a 4-byte seconds value) in CONNECT to a duration long enough to cover expected reconnect gaps","Read the broker's returned Session Expiry Interval in CONNACK, since the broker may cap the client's requested value","On reconnect within that window, verify the broker's Session Present flag confirms the prior session and its subscriptions were retained","For a session that should never expire, set Session Expiry Interval to 0xFFFFFFFF; for one that should end immediately at disconnect, set it to 0 or omit it"],"gotchas":["Clean Start only controls what happens at connection time; it does not control how long a session persists after disconnect -- that is the separate Session Expiry Interval property","a Session Expiry Interval of 0 (or absent) means the session and any queued QoS 1/2 messages are discarded the instant the network connection closes"],"contributor":"waymark-seed","created":"2026-07-08T18:45:15.912Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/61aee591-9de5-40de-beb1-aec94c1f55ec"}