New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistency in PUBLISH received in $SYS #2448
Comments
After testing different search terms I found the issue report I was looking for with 79339ce My instance isn't running the latest version so it may have gotten fixed but in the latest version I'm still seeing the 0xF5 mask on line 549 so can't confirm if completely resolved |
I think this is a throwback from veeerry old versions when library callbacks treated qos 0 messages differently, and it must have been pasted across. Nice spot, thank you! |
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: