Open DrmagicE opened 4 years ago
wireshark capture:
Frame 141: 81 bytes on wire (648 bits), 81 bytes captured (648 bits) on interface 0
Null/Loopback
Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
Transmission Control Protocol, Src Port: 53219, Dst Port: 1883, Seq: 1, Ack: 1, Len: 25
MQ Telemetry Transport Protocol, Connect Command
Header Flags: 0x10, Message Type: Connect Command
Msg Len: 23
Protocol Name Length: 4
Protocol Name: MQTT
Version: MQTT v5.0 (5)
Connect Flags: 0x02, QoS Level: At most once delivery (Fire and Forget), Clean Session Flag
Keep Alive: 0
Properties
Total Length: 0
Client ID Length: 10
Client ID: myclientid
Frame 143: 82 bytes on wire (656 bits), 82 bytes captured (656 bits) on interface 0
Null/Loopback
Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
Transmission Control Protocol, Src Port: 1883, Dst Port: 53219, Seq: 1, Ack: 26, Len: 26
MQ Telemetry Transport Protocol, Connect Ack
Header Flags: 0x20, Message Type: Connect Ack
Msg Len: 24
Acknowledge Flags: 0x00
Reason Code: Success (0)
Properties
Total Length: 21
ID: Receive Maximum (0x21)
Value: 2
ID: Topic Alias Maximum (0x22)
Value: 10
ID: Maximum QoS (0x24)
QoS: Exactly once delivery (Assured Delivery) (2)
ID: Retain Available (0x25)
Value: 1
ID: Maximum Packet Size (0x27)
Value: 200
ID: Wildcard Subscription Available (0x28)
Value: 1
ID: Subscription Identifier Available (0x29)
Value: 1
ID: Shared Subscription Available (0x2a)
Value: 1
Frame 145: 78 bytes on wire (624 bits), 78 bytes captured (624 bits) on interface 0
Null/Loopback
Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
Transmission Control Protocol, Src Port: 53219, Dst Port: 1883, Seq: 26, Ack: 27, Len: 22
MQ Telemetry Transport Protocol, Publish Message
Header Flags: 0x34, Message Type: Publish Message, QoS Level: Exactly once delivery (Assured Delivery)
Msg Len: 20
Topic Length: 6
Topic: TopicA
Message Identifier: 2
Properties
Total Length: 0
Message: 6d6573736167652031
Frame 147: 78 bytes on wire (624 bits), 78 bytes captured (624 bits) on interface 0
Null/Loopback
Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
Transmission Control Protocol, Src Port: 53219, Dst Port: 1883, Seq: 48, Ack: 27, Len: 22
MQ Telemetry Transport Protocol, Publish Message
Header Flags: 0x34, Message Type: Publish Message, QoS Level: Exactly once delivery (Assured Delivery)
Msg Len: 20
Topic Length: 6
Topic: TopicA
Message Identifier: 3
Properties
Total Length: 0
Message: 6d6573736167652032
Frame 149: 62 bytes on wire (496 bits), 62 bytes captured (496 bits) on interface 0
Null/Loopback
Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
Transmission Control Protocol, Src Port: 1883, Dst Port: 53219, Seq: 27, Ack: 70, Len: 6
MQ Telemetry Transport Protocol, Publish Received
Header Flags: 0x50, Message Type: Publish Received
Msg Len: 4
Message Identifier: 2
Reason Code: No matching subscribers (16)
Properties
Total Length: 0
Frame 151: 62 bytes on wire (496 bits), 62 bytes captured (496 bits) on interface 0
Null/Loopback
Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
Transmission Control Protocol, Src Port: 1883, Dst Port: 53219, Seq: 33, Ack: 70, Len: 6
MQ Telemetry Transport Protocol, Publish Received
Header Flags: 0x50, Message Type: Publish Received
Msg Len: 4
Message Identifier: 3
Reason Code: No matching subscribers (16)
Properties
Total Length: 0
Frame 152: 78 bytes on wire (624 bits), 78 bytes captured (624 bits) on interface 0
Null/Loopback
Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
Transmission Control Protocol, Src Port: 53219, Dst Port: 1883, Seq: 70, Ack: 33, Len: 22
MQ Telemetry Transport Protocol, Publish Message
Header Flags: 0x34, Message Type: Publish Message, QoS Level: Exactly once delivery (Assured Delivery)
Msg Len: 20
Topic Length: 6
Topic: TopicA
Message Identifier: 4
Properties
Total Length: 0
Message: 6d6573736167652033
Frame 155: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Null/Loopback
Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
Transmission Control Protocol, Src Port: 1883, Dst Port: 53219, Seq: 39, Ack: 92, Len: 4
MQ Telemetry Transport Protocol, Disconnect Req
Header Flags: 0xe0, Message Type: Disconnect Req
Msg Len: 2
Reason Code: Receive Maximum exceeded (147)
Properties
Total Length: 0
Frame 159: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Null/Loopback
Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
Transmission Control Protocol, Src Port: 53219, Dst Port: 1883, Seq: 92, Ack: 44, Len: 4
MQ Telemetry Transport Protocol, Publish Release
Header Flags: 0x62, Message Type: Publish Release
Msg Len: 2
Message Identifier: 2
I use this repo to test my broker program. I set server receive maximum = 2 and run
test_flow_control2
. The test fails with the following error:The packet flows:
According to the spec, when receives more than receive maximum, the server should send disconnect and close the network.
I expect it should pass the test. Did i miss something?