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-310) Treat invalid topic alias as a protocol error.


    [ https://issues.oasis-open.org/browse/MQTT-310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63721#comment-63721 ] 

Peter Niblett commented on MQTT-310:
------------------------------------

Commenting Ed's 1 and 3.   

The Topic Alias is part of the PUBLISH packet, not PUBREC, PUBREL etc. and I thought that the procedures in MQTT-269 make it clear that the registration of the alias is done by the receiver when it receives the PUBLISH, and not at any later date.

Note that the connection used by client 1 to publish messages to a server is completely decoupled from the connection used by that server to forward publications to a second clients 2.  When the server receives a PUBLISH from client 1 it substitutes the true topic name in place of the alias used by topic 1, when it forwards it on to client 2 it may choose to use an alias instead of the full topic name.. but if it does so it will be an alias established by the server in order to talk to client 2, and so won't necessarily be the same as the alias that was used by client 1.

A server is allowed to forward a QoS 0 message ahead of a QoS 2 on the same topic. If it wants to do this and use a Topic Alias it has to make sure it establishes it with the first message that it sends regardless of the QoS (or more precisely if it sends a message to a client that doesn't have a full topic name then it has to have made sure that it previously sent a message that established the alias).

Now let's consider just the QoS 0 message case.  Suppose client 1 publishes a stream of QoS 0 messages to the server on a single topic, and the server forwards them to client 2.   Suppose client 1 uses the first PUBLISH to establish the alias.  It's important that the server records the alias even if it then decides it's going to discard the payload and not forward it to anyone else. That's because client 1 is going to be using that alias on its subsequent PUBLISH packets, and the server might want to forward them. 

> Treat invalid topic alias as a protocol error.
> ----------------------------------------------
>
>                 Key: MQTT-310
>                 URL: https://issues.oasis-open.org/browse/MQTT-310
>             Project: OASIS Message Queuing Telemetry Transport (MQTT) TC
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 5
>            Reporter: Andrew Banks
>
> Issue 269 MQTT-SN Feature: Topic Registration allows the protocol to continue where an invalid topic alias has been used.
> The network is required to provided an in order lossless connection so the only possible causes of an invalid alias are an incorrect implementation or the sending of publications by the client before the connack has been received informing it of the servers maximum topic alias value. 
> Continuing the message flow risks data loss. In all cases where an invalid topic alias is received the receiver should disconnect with a 130	0x82	Protocol error disconnect code.



--
This message was sent by Atlassian JIRA
(v6.2.2#6258)


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