Inconsistency in PUBLISH received in $SYS #2448
Labels
Component: mosquitto-broker
Status: Completed
Nothing further to be done with this issue, it can be closed by the requestor or committer.
Type: Bug
Milestone
Hi!
Some of the statistics reported by the tool ($SYS/broker/publish/messages/received and $SYS/broker/load/publish/received/+) are ignoring publishes with QoS 2 or the retain flag.
According to the documentation on the webpage: 'The total number of PUBLISH messages received since the broker started.'.
The cause seems to be that within lib/packet_mosq.c, it only gets added if it matches the PUBLISH control packet 0x30 after applying a bitmask of 0xF5. To my understanding the bitmask should be either 0xF0 or maybe even 0xF8. The reason being that it should only check the first nibble to see if it is the proper control type (publish == 0x3X) and maybe make sure that it isn't a duplicate (0x08).
Currently the 0xF5 bitmask will essentially mean that retain bits and QoS 2 messages will not be recognized and therefore not included in the system statistics.
I may be misunderstanding its purpose, but wanted to raise it as a point of concern as my instance is reporting next to no publishes received despite receiving regular messages.
The text was updated successfully, but these errors were encountered: