Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mosquitto-dev] Testing mosquitto 1.3 against MQTT 3.1.1 specs (protocol level 4):

Testing mosquitto 1.3 on RPI against MQTT 3.1.1 specs (protocol level 4):


Used client library: MQTT-Client-Framework for IOS (Objective-C) https://github.com/ckrey/MQTT-Client-Framework

All 59 tests with focus on CONNECT, PUBLISH and SUBSCRIBE were successful except the following 5:

1. UNSUBSCRIBE accepts empty topic name and returns UNSUBACK

All Topic Names and Topic Filters MUST be at least one character long [MQTT-4.7.3-1]

1395143242: New connection from 192.168.178.41 on port 1883.
1395143242: New client connected from 192.168.178.41 as MQTTClient-416836042.026704 (c1, k60).
1395143242: Sending CONNACK to MQTTClient-416836042.026704 (0)
1395143243: Received UNSUBSCRIBE from MQTTClient-416836042.026704
1395143243: 
1395143243: MQTTClient-416836042.026704 
1395143244: Received DISCONNECT from MQTTClient-416836042.026704

n.b. SUBSCRIBE with empty topic name correctly closes the connection

2. SUBSCRIBE accepts multi-level wildcard character in the middle of topic filter and returns  positive SUBACK

The multi-level wildcard character MUST be specified either on its own or following a topic level separator. In either case it MUST be the last character specified in the Topic Filter[MQTT-4.7.1-2].

1395143403: New connection from 192.168.178.41 on port 1883.
1395143403: New client connected from 192.168.178.41 as MQTTClient-416836203.529060 (c1, k60).
1395143403: Sending CONNACK to MQTTClient-416836203.529060 (0)
1395143404: Received SUBSCRIBE from MQTTClient-416836203.529060
1395143404: abc/#/def (QoS 0)
1395143404: MQTTClient-416836203.529060 0 abc/#/def
1395143404: Sending SUBACK to MQTTClient-416836203.529060
1395143405: Received DISCONNECT from MQTTClient-416836203.529060

3. SUBSCRIBE accepts single-level wildcard character not occupying an entire level of the topic filter  and returns  positive SUBACK

The single-level wildcard can be used at any level in the Topic Filter, including first and last levels. Where it is used it MUST occupy an entire level of the filter [MQTT-4.7.1-3].

1395143412: New connection from 192.168.178.41 on port 1883.
1395143412: New client connected from 192.168.178.41 as MQTTClient-416836212.360115 (c1, k60).
1395143412: Sending CONNACK to MQTTClient-416836212.360115 (0)
1395143413: Received SUBSCRIBE from MQTTClient-416836212.360115
1395143413: abc+ (QoS 0)
1395143413: MQTTClient-416836212.360115 0 abc+
1395143413: Sending SUBACK to MQTTClient-416836212.360115
1395143414: Received DISCONNECT from MQTTClient-416836212.360115

4. PUBLISH accepts QoS = 3 and treats it as QoS = 0
   
   Though not explicitly stated, the expected behaviour is closing the connection.

If the Client or Server encounters a transient error while processing an inbound Control Packet it MUST close the Network Connection on which it received that packet [MQTT-4.8.0-1].

2.1.2.2 QoS

Position: byte 1, bit 2-1.

This field indicates the level of assurance for delivery of an Application Message. The QoS levels are shown in the table below.

 

QoS value

bit 2

bit 1

Description

0

0

0

At most once delivery

1

0

1

At least once delivery

2

1

0

Exactly once delivery

3

1

1

Reserved (MUST NOT be used)



1395143803: New connection from 192.168.178.41 on port 1883.
1395143803: New client connected from 192.168.178.41 as MQTTClient-416836603.501409 (c1, k60).
1395143803: Sending CONNACK to MQTTClient-416836603.501409 (0)
1395143804: Received PUBLISH from MQTTClient-416836603.501409 (d0, q3, r0, m2, 'MQTTClient/-[MQTTClientPublishTests testPublish_r0_q3]', ... (43 bytes))
1395143814: Received DISCONNECT from MQTTClient-416836603.501409

5. CONNECT accepts will QoS = 3 and treats it as QoS = 0

If the Will Flag is set to 1, the value of Will QoS can be 0 (0x00), 1 (0x01), or 2 (0x02). It MUST NOT be 3 (0x03). [MQTT-3.1.2-12].


1395145284: New connection from 192.168.178.41 on port 1883.
1395145284: New client connected from 192.168.178.41 as -[MQTTClientTests test_connect_will_with_qos3] (c1, k10).
1395145284: Sending CONNACK to -[MQTTClientTests test_connect_will_with_qos3] (0)
1395145285: Socket error on client -[MQTTClientTests test_connect_will_with_qos3], disconnecting.
1395145285: Sending PUBLISH to … (d0, q0, r0, m0, 'will-qos3', ... (9 bytes))



Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail


Back to the top