Cleansession should act like MQTT 5.0 not 3.1.1

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Trivial
    • wd04
    • Affects Version/s: MQTT-SN-1.2
    • Component/s: MQTT-SN
    • None
    • Hide

      Section should read;

      5.4.4 CONNECT

      Length MsgType Flags ProtocolId KeepAlive SessionExpiryInterval ClientId
      (0) (1) (2) (3) (4,5) (6:9) (10:n)

      Table 9: CONNECT Message
      The CONNECT message is sent by a client to setup a connection. Its format is shown in Table 9:
      • Length and MsgType: see Section 5.2.
      • Flags:
      – DUP, QoS, Retain, TopicIdType: not used.
      – Will: if set, indicates that client is requesting for Will topic and Will message prompting;
      – CleanStart: same meaning as with MQTT, however extended for Will topic and Will message (see Section 6.3).
      • ProtocolId: corresponds to the “ProtocolName” and “ProtocolVersion” of the CONNECT message.
      • KeepAlive: same as with MQTT, contains the value of the Keep Alive timer.
      • SessionExpiryInterval: same with MQTT, contains the time the gateway will maintain the session
      • ClientId: same as with MQTT, contains the client id, a string which uniquely identifies the client to the server.

      Show
      Section should read; 5.4.4 CONNECT Length MsgType Flags ProtocolId KeepAlive SessionExpiryInterval ClientId (0) (1) (2) (3) (4,5) (6:9) (10:n) Table 9: CONNECT Message The CONNECT message is sent by a client to setup a connection. Its format is shown in Table 9: • Length and MsgType: see Section 5.2. • Flags: – DUP, QoS, Retain, TopicIdType: not used. – Will: if set, indicates that client is requesting for Will topic and Will message prompting; – CleanStart: same meaning as with MQTT, however extended for Will topic and Will message (see Section 6.3). • ProtocolId: corresponds to the “ProtocolName” and “ProtocolVersion” of the CONNECT message. • KeepAlive: same as with MQTT, contains the value of the Keep Alive timer. • SessionExpiryInterval: same with MQTT, contains the time the gateway will maintain the session • ClientId: same as with MQTT, contains the client id, a string which uniquely identifies the client to the server.

      The clean session flag operates in a similar manner to MQTT 3.1.1 in that the cleanup operates at both the start and end of the session. In MQTT 5.0, the clean session flag becomes the clean start flag, and a separate property session expiry dictates when the session state is removed on the server. The MQTT 5.0 facilities are much more flexible and I would advocate changing MQTT-SN to match. One way to achieve this would be to add a session expiry 2 byte integer field (matching the duration field) to the CONNECT packet.

            Assignee:
            simon.johnson
            Reporter:
            ian.craggs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: