MQTT Topics and Wildcards
An MQTT topic is a UTF-8 string with levels separated by forward slashes that labels each published message; subscribers select messages with exact topics or with the single-level (+) and multi-level (#) wildcards.
Topics are created implicitly when a client publishes to them, with no need to register them on the broker. Each level narrows the scope, as in site/area/line/machine/measurement. A subscription to site/area/+/machine1/temperature matches that measurement on any line, while site/area/# matches everything below the area. Wildcards can be used only in subscriptions, not when publishing, and topics beginning with $ are reserved for broker-specific use, such as $SYS statistics topics.
A well-designed topic hierarchy is central to IIoT and unified namespace architectures, where it often mirrors the physical or ISA-95 equipment hierarchy so that users and applications can find data intuitively. Topics are case-sensitive, so consistent naming conventions, character sets and case rules avoid duplicate topics that differ only in spelling. The Sparkplug specification defines its own fixed topic structure for industrial interoperability.
Very deep or very granular hierarchies can increase broker load and complicate access control, while overly flat ones make subscriptions coarse. Retained messages give new subscribers the latest value on a topic, which suits state data. Access control lists usually grant permissions by topic pattern, so the hierarchy should also be designed with security boundaries in mind.
Key points
- Topics are hierarchical strings with levels separated by forward slashes
- The + wildcard matches one level; # matches all remaining levels
- Wildcards are allowed in subscriptions only
- Topics are case-sensitive and created implicitly on first publish
- Hierarchy design shapes discoverability and access control
Where AiVibe comes in
AiAmbA IoT is AiVibe's edge protocol layer: it discovers devices and normalises industrial signals, with supported protocols including Siemens S7, Mitsubishi MC, Delta Modbus, OPC UA and MQTT, and driver availability confirmed per installation. Writes to machines are deny-by-default.
Related terms
- MQTTIndustrial IoT & Edge
- Unified Namespace (UNS)Industrial IoT & Edge
- MQTT BrokerIndustrial IoT & Edge
- Sparkplug BIndustrial IoT & Edge
- MQTT 5Industrial IoT & Edge