-
Notifications
You must be signed in to change notification settings - Fork 559
Description
Section 4.7.2 of the MQTT 3.1 spec states:
The Server MUST NOT match Topic Filters starting with a wildcard character (# or +) with Topic Names beginning with a $ character
While this does not directly impact the client I think it's fair to expect that the callback for a Subscribe("#")
should not be called when a $SYS/#
message is received. Currently the callback is called in these cases.
This was raised in PR #721 but I feel that solution was probably incomplete (and could not be accepted due to lack of signed Eclipse Contributor Agreement) so that PR has been closed and I'm raising this issue so it's recorded as a TODO.
As the spec states "For a Client to receive messages from topics that begin with $SYS/ and from topics that don’t begin with a $, it has to subscribe to both “#” and “$SYS/#” it's probably better to check if either route or topic begin with $ and, if so, reject if both do not start with $).