Sparkplug B
Sparkplug B is an open specification (Eclipse Foundation) that standardises MQTT topics, payloads and device state for industrial systems such as Ignition. ConnectMQ supports it in two ways: the broker carries Sparkplug B traffic unchanged, and ConnectMQ Cloud automatically converts every Sparkplug B message into an ISA-95 topic with a readable JSON payload.
Sparkplug B in short
Sparkplug B topics follow a fixed pattern:
spBv1.0/<group_id>/<message_type>/<edge_node_id>/<device_id>| Message type | Meaning |
|---|---|
NBIRTH / DBIRTH | An edge node or device comes online and announces its metrics |
NDATA / DDATA | New metric values |
NDEATH / DDEATH | An edge node or device goes offline (usually the Last Will) |
NCMD / DCMD | A command to an edge node or device |
STATE | Online state of a host application such as SCADA |
Payloads are binary Protocol Buffers with a list of named, typed metrics. That keeps messages small, but they cannot be read without a decoder, which is why ConnectMQ converts them.
What ConnectMQ does with Sparkplug B
- Passes it through. Sparkplug nodes and host applications use the broker like any MQTT client; the original
spBv1.0/...messages are delivered unchanged to every subscriber. - Converts it to ISA-95 automatically. For every Sparkplug B message, ConnectMQ Cloud also publishes a JSON copy on an ISA-95 topic in your organization. No configuration is needed.
- Uses it everywhere. The converted topics appear in the console's topic tree, on the Devices page, in alert rules and in the Digital Twin, next to your plain MQTT devices: one Unified Namespace.
The conversion runs for every Sparkplug B publisher: nodes that connect to ConnectMQ directly, and nodes on a plant network that publish through the local broker of ConnectMQ Edge.
How topics are converted
spBv1.0/<site>_<area>/<type>/<edge_node>/<device>
→ connectmq/<site>/<area>/<edge_node>/<device>/<suffix>| Sparkplug B | ISA-95 topic in ConnectMQ |
|---|---|
Group plant1_packing | Site plant1, area packing (split at the first _ or -) |
Edge node line1 | Line line1 |
Device filler1 | Device filler1 (the edge node name if the message has no device) |
DDATA, NDATA | …/telemetry |
DBIRTH, NBIRTH | …/birth |
DDEATH, NDEATH | …/death |
DCMD, NCMD | …/command |
STATE | …/state |
The first level is always connectmq. Example:
spBv1.0/plant1_packing/DDATA/line1/filler1 original, protobuf
connectmq/plant1/packing/line1/filler1/telemetry converted, JSONName your groups site_area
Use group IDs such as plant1_packing so that site and area come out right. A group without _ or - becomes the site, and a default area is used.
How payloads are converted
The metrics become one flat JSON object, keyed by metric name, plus the payload timestamp:
{ "Temperature": 71.4, "Speed": 120, "Running": true, "timestamp": 1763049600000 }- Protobuf payloads (standard Sparkplug B) and JSON payloads in the
{"metrics":[{"name":…,"value":…}]}form are both understood. - Supported metric types: integers, floats, doubles, booleans and strings.
- The converted message keeps the QoS and retained flag of the original and carries two user properties:
x-converted-from: sparkplug-bandx-original-topic. - The converted copy does not count towards your inbound traffic, message rate or retained-message limits; deliveries to subscribers count as outbound traffic like any message.
Use the …/death topics with an alert rule to know when a node or device goes offline.
Limitations
- Metric names are required in every message. Aliases announced in a BIRTH message are not resolved, so a metric that is sent only by alias in DATA messages is left out of the JSON copy. In Ignition MQTT Transmission and similar tools, turn alias usage off.
- Datasets, templates and byte arrays are skipped; per-metric timestamps are not copied (the payload timestamp is).
- Commands sent from the cloud are delivered on the original
spBv1.0/.../NCMDorDCMDtopics. Nodes behind ConnectMQ Edge's local broker do not receive cloud commands. - The 8 topic-level limit applies; standard Sparkplug B topics have at most 5 levels.