MQTTX
MQTTX copied to clipboard
[Bug] topic subscription merges foo/# with foobar/#
What did I do
Created a topic subscription in the format tray/#
in order to subscribe to messages in the format tray/abcd1234/state
tray/12cbac123/ping
etc.
Note we have a seperate subscriptions setup for traybot/#
What happened
Messages of the format traybot/#
are also being subscribed to
Expected
Expected result would be that traybot/#
messages are ignored as they do not conform to the pattern tray/#
~it appears that the trailing /
character is being ignored and that the subscription is instead tray#
which is unexpected behaviour.~ (edit, see comment below)
Environment
- OS: OS version, e.g. macOS Big Sur 11.1
- MQTTX version, e.g. v1.5.0
More detail
Screenshot showing subscription and also one correct and one incorrect message. (Please note that the payloads, redacted as I don't have approval to share, do not contain the words "tray" anywhere)