Skip to content

[Bug] topic subscription merges foo/# with foobar/# #1734

@pinchy

Description

@pinchy

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)
Screenshot 2024-08-16 at 3 11 15 PM
Screenshot 2024-08-16 at 3 10 31 PM

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdesktopMQTTX Desktop

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions