Skip to content

Unexpected behavior while using single level wildcard + for the subscriber application. #1088

@vpeddada-tibco

Description

@vpeddada-tibco

We are connecting to HiveMQ cluster using paho client V5 i.e org.eclipse.paho.mqttv5.client-1.2.5.jar.
While we were evaluating the multi level wildcard feature for the subscriber we observed a discrepancy in behavior.

Here is a short descripton of the use case:

Expected: The + wildcard in MQTT should match only one topic level. So, a subscription to sport/tennis/+ should not match a published topic like sport/tennis/2023/team, as it contains two levels after sport/tennis/. Only sport/tennis/2023 should match when + is used after sport/tennis.

Reference links:

https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901245
https://www.hivemq.com/blog/mqtt-essentials-part-5-mqtt-topics-best-practices

Actual behavior :
when topic name for the subscriber is used as sport/tennis/+ and the message is published to sport/tennis/2023/team, then the subscriber still receives this message.

Could this be a valid item for a defect? Please let us know if any additional information is required. FYI, we register a callback to receive the messages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions