OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

mqtt message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: [OASIS Issue Tracker] (MQTT-574) Add reason code/string to the disconnect packet

     [ https://issues.oasis-open.org/browse/MQTT-574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Johnson updated MQTT-574:
Section should now read;


|(octet 0)|(1)|(2:5)|(6)|(7:n)

The format of the DISCONNECT message is illustrated in Table 24:
* Length and MsgType: see Section 5.2.
* Session Expiry Interval: contains the value of the Session Expiry Interval timer; when the value of this field is non zero, it is deemed to be sent by a client that wants to go to the âasleepâ state, see Section 6.14 for further details.
* ReasonCode: A code representing the reason for disconnection. 
* ReasonString: A string representing a clear text description of disconnection.

||Value||Reason Code||Sent by||Description||
|0|0x00|Client or Gateway|Normal disconnect|
|2-15|0x02-0x0F|Reserved|Reserved range|
|16-255|0x10-0xFF|Client or Server|Custom disconnect codes|

As with MQTT, the DISCONNECT message is sent by a client to indicate that it wants to close the connection. The gateway will acknowledge the receipt of that message by returning a DISCONNECT to the client. A server or gateway may also sends a DISCONNECT to a client, e.g. in case a gateway, due to an error, cannot map a received message to a client. Upon receiving such a DISCONNECT message, a client should try to setup the connection again by sending a CONNECT message to the gateway or server.

A DISCONNECT message with a SessionExpiryInterval field is sent by a client when it wants to go to the âasleepâ state. The receipt of this message is also acknowledged by the gateway by means of a DISCONNECT message.

New disconnect packet would look like, including the new KeepAlive field expansion

|(octet 0)|(1)|(2:5)|(6)|(7:n)

> Add reason code/string to the disconnect packet
> -----------------------------------------------
>                 Key: MQTT-574
>                 URL: https://issues.oasis-open.org/browse/MQTT-574
>             Project: OASIS Message Queuing Telemetry Transport (MQTT) TC
>          Issue Type: Improvement
>          Components: MQTT-SN
>    Affects Versions: MQTT-SN-1.2
>            Reporter: Ian Craggs
>            Assignee: Simon Johnson
>            Priority: Major
> As in MQTT 5.0, the disconnect packet should contain a reason code, and perhaps a reason string so that the receiver has an explanation for the termination of the session.

This message was sent by Atlassian Jira

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]