Uploaded image for project: 'OASIS Message Queuing Telemetry Transport (MQTT) TC'
  1. OASIS Message Queuing Telemetry Transport (MQTT) TC
  2. MQTT-508

The default for session expiry should be 0, not never

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5, CSD01
    • Fix Version/s: 5, wd16
    • Component/s: core
    • Labels:
      None

      Description

      If no session expiry property is included in the connect packet, then the default is assumed to be no expiry. This could lead to applications unintentionally leaving client state on the server and never cleaning up. This was the reason that the clean start flag was changed to clean session for later versions of MQTT.

      I think that it should be an effort for the application to leave session state lying around, rather than it being the easiest option. In that vein, the default if no session expiry is included should be 0, not infinite.

      This does pose the question of whether there should be a special value to indicate no expiry, other than max int. But that may not be crucial or necessary.

        Attachments

          Activity

            People

            • Assignee:
              Andrew_Banks Andrew Banks
              Reporter:
              icraggs Ian Craggs (Inactive)
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: