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-543) Allow long topic names for publish of all QoS


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

Ian Craggs updated MQTT-543:
----------------------------
    Proposal: 
Section 5.3.4 Flags
 * _TopidIdType:_ indicates whether the field _TopicId_ included in this packet contains:
 ** "0b00" - a registered topic id
 ** "0b01" - a pre-registered topic id
 ** "0b10" - a short, 2-byte, topic name
 ** "0b11" - a long topic name

Section 5.4.12 PUBLISH

{color:#de350b}Add a publish packet version for a long topic name (topicIdType "0b11"){color}
||Length||MsgType||Flags||TopicLength||MsgId||TopicName||Data||
|(octet 0)|(1)|(2)|(3-4) tl|(5-6)|(7 - 7+tl)|(8+tl - n)|

Table 16.1: PUBLISH Packet

TopicLength: the length of the long topic name if the topicIdType is "0b11".

TopicName: the long topic name if the topicIdType is "0b11".Â

If a connection has not been established, the only QoS that can be used is -1. In these circumstances, a registered topic id cannot be used as there is no means for registration. Preâregistered topic ids, short and long topic names can be used with QoS -1.

Â

Â

  was:
Section 5.3.4 Flags
 * _TopidIdType:_ indicates whether the field _TopicId_ included in this packet contains:
 ** "0b00" - a registered topic id
 ** "0b01" - a pre-registered topic id
 ** "0b10" - a short, 2-byte, topic name
 ** "0b11" - a long topic name

Section 5.4.12 PUBLISH

{color:#de350b}Add a publish packet version for a long topic name (topicIdType "0b11"){color}
||Length||MsgType||Flags||TopicLength||MsgId||TopicName||Data||
|(octet 0)|(1)|(2)|(3-4) tl|(5-6)|(7 - 7+tl)|(8+tl - n)|

Table 16: PUBLISH Packet

TopicLength: the length of the long topic name if the topicIdType is "0b11".

TopicName: the long topic name if the topicIdType is "0b11".Â

If a connection has not been established, the only QoS that can be used is -1. In these circumstances, a registered topic id cannot be used as there is no means for registration. Preâregistered topic ids, short and long topic names can be used with QoS -1.

Â

Â


> Allow long topic names for publish of all QoS
> ---------------------------------------------
>
>                 Key: MQTT-543
>                 URL: https://issues.oasis-open.org/browse/MQTT-543
>             Project: OASIS Message Queuing Telemetry Transport (MQTT) TC
>          Issue Type: Improvement
>          Components: MQTT-SN
>    Affects Versions: MQTT-SN-1.2
>            Reporter: Ian Craggs
>            Assignee: Ian Craggs
>            Priority: Major
>
> In both MQTT 5.0 and MQTT-SN topic ids can be used instead of a full topic string. However, in MQTT-SN this is almost compulsory, because the PUBLISH packetâs one variable length field is the payload. The topic data is limited to a two byte field to hold a topic id (2 byte integer) or a short topic string (2 bytes). In MQTT 5.0 the topic id is registered by including it in the publish packet along with the long topic string. In MQTT-SN this registration is delegated to a separate packet, REGISTER, which must be sent before sending a PUBLISH packet. This applies to both clients and servers.
> This does lead to a problem when using the PUBLISH packet in a QoS -1 mode, which is exclusive to MQTT-SN. QoS -1 in MQTT-SN means that a client can send a message to a server outside of the familiar CONNECT/DISCONNECT session start and end range. Typically this could be used in a multi-cast environment where the client is not sure of the location of the server. There are a number of proposals to allow a variable length topic name to be included in a PUBLISH packet. At least one has already been implemented, which is to use the spare topic id type indicator to specify that the topic name is variable length field, and the topic id integer holds the length. This would mean the PUBLISH packet is the only one with two variable length fields (topic name and payload). I would advocate allowing this format for all PUBLISH QoS.



--
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]