New: the AI firewall watches the whole platform and explains each incident in plain words. See how it works

MQTT topic wildcard tester

Free MQTT topic wildcard tester: check which topics a filter with + and # matches under the MQTT 3.1.1 rules, including the broker's own $SYS topics.

This MQTT topic wildcard tester applies the MQTT 3.1.1 rules: + matches exactly one topic level, # matches its own level and everything below, and a filter that starts with a wildcard never matches $ topics.

Use + for one level and # for every level below. # must be the last level.

Matches: –

    How it works

    How do the MQTT wildcards + and # work?

    Topics are levels separated by /. A filter matches a topic level by level: + matches exactly one level, whatever it holds, and # matches the level it stands on and every level below it, including none.

    So sport/# matches sport, sport/tennis and sport/tennis/player1, while sport/+ matches sport/tennis but neither sport nor sport/tennis/player1.

    Topics that start with $, such as $SYS/…, are the broker’s own. A filter that starts with + or # does not match them; subscribe to $SYS/# to see them. Topics themselves can’t contain + or #.

    In Hermetry Devices that talk MQTT to Hermetry subscribe only to their own downlink topics, such as v1/attributes/set and v1/rpc/req/+: MQTT topics and payload reference.

    Glossary MQTT topic, MQTT, MQTT QoS (quality of service), Publish-subscribe

    Questions

    Questions about the MQTT topic wildcard tester

    What does + match in MQTT?

    Exactly one topic level. site/+/temperature matches site/north/temperature but not site/north/room1/temperature.

    What does # match in MQTT?

    The level it is on and everything below, including the parent itself: sport/# matches sport and sport/tennis/player1. It must be the last character of the filter.

    Why doesn’t # match $SYS topics?

    Topics starting with $ carry the broker’s own information, and filters that start with a wildcard leave them out. Subscribe to $SYS/# explicitly.