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:
-------------------------------
    Proposal: 
Section should now read;

5.4.21 DISCONNECT

||Length||MsgType||ReturnCode||SessionExpiryInterval||ReasonString||
|(octet 0)|(1)|(2)|(3:6)|(7:n)

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

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 transition to the âasleepâ state. The receipt of this message is also acknowledged by the gateway by means of a DISCONNECT message.


  was:
Section should now read;

5.4.21 DISCONNECT

||Length||MsgType||ReasonCode||SessionExpiryInterval||ReasonString||
|(octet 0)|(1)|(2)|(3:6)|(7:n)

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

Valid reason codes and reasons are shown in the table below.
||Value||Reason Code||Sent by||Description||
|0|0x00|Client or Gateway|Normal disconnect or sleep request|
|1|0x01|Gateway|Congestion|
|2|0x02|Gateway|Reconnect required|
|3|0x03|Client or Gateway|Unexpected error|
|4-15|0x04-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 transition to the âasleepâ state. The receipt of this message is also acknowledged by the gateway by means of a DISCONNECT message.



> 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
(v8.3.3#803004)


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