Ignition MQTT integration is one of the most popular ways to build a Sparkplug B architecture: an Ignition Edge gateway publishes tags, a central Ignition gateway consumes them, and an MQTT broker sits in between. In this tutorial you will configure the MQTT Transmission and MQTT Engine modules against an external broker instead of the built-in one, publish a folder of tags as Sparkplug B, see them appear as tags on the consuming side, and verify the decoded data independently. Expect to have it working within an hour.
The Ignition MQTT Modules
The MQTT modules for Ignition are developed by Cirrus Link and distributed through Inductive Automation. Three matter here:
| Module | Role | Typical location |
|---|---|---|
| MQTT Transmission | Publishes Ignition tags as Sparkplug B (edge node) | Ignition Edge or a site gateway |
| MQTT Engine | Subscribes to Sparkplug B and creates Ignition tags (primary host) | Central or control-center gateway |
| MQTT Distributor | An MQTT broker running inside Ignition | Optional; replaced here by an external broker |
Using an external broker instead of MQTT Distributor decouples your messaging layer from the Ignition gateway's lifecycle. Gateway restarts, upgrades and licensing no longer take the broker down, and non-Ignition clients such as Python services, historians or other SCADA systems connect to the same broker on equal terms. A cloud MQTT broker is particularly useful when edge sites have no direct network path to the central gateway.
Prerequisites
- Ignition 8.1 or newer: one gateway for Transmission (the edge) and one for Engine (the host). For a lab, both modules can run on the same gateway.
- The MQTT Transmission and MQTT Engine modules, installed through Config > System > Modules > Install or Upgrade a Module. Without a license they run in trial mode, which can be reset.
- An MQTT broker. For a lab, the public broker at broker.connectmq.com; for production, a private broker with credentials.
- Outbound access from both gateways to TCP 1883 (testing) or 8883 (TLS).
Step 1: Point MQTT Transmission at the Broker
- In the Ignition gateway web interface, open Config > MQTT Transmission > Settings.
- On the Servers tab, edit the default server or create a new one:
- Name:
connectmq - URL:
tcp://broker.connectmq.com:1883for the lab, orssl://YOUR_BROKER_HOST:8883for production - Username and Password: empty for the public broker;
YOUR_USERNAMEandYOUR_PASSWORDfor production
- Name:
- Remove or disable any server entry that points at a local MQTT Distributor, so Transmission does not split traffic across brokers.
- Save. The server status should change to connected within a few seconds.
For TLS with a Let's Encrypt certificate, the Java trust store bundled with Ignition normally validates the chain, so you usually do not need to upload a CA file. If your module version exposes a client ID field and your broker binds client IDs to credentials, enter the issued YOUR_CLIENT_ID there; each module connection needs its own credentials and client ID.
Step 2: Create the Edge Tags
MQTT Transmission publishes tags found under a configured tag path, by default the Edge Nodes folder in the default tag provider. The folder levels below it map to Sparkplug identifiers:
[default]Edge Nodes/
cmqdemo-4kz9/ <- Sparkplug Group ID (unique on the public broker)
Line1/ <- Edge Node ID
Filler/ <- Device ID
Temperature (Float, memory or OPC tag)
Speed (Int4)
Running (Boolean)
Count (Int8)
On the public broker, every Sparkplug topic starts with spBv1.0, so pick a random Group ID like cmqdemo-4kz9 to avoid colliding with other users, and use memory or simulator tags rather than real process values: anything published there is readable by anyone.
On the Transmitters tab, check that the default transmitter uses tag provider default and tag path Edge Nodes, and that Primary Host ID is set, for example IgnitionHost. With a primary host ID set, the edge node waits for the host's STATE message before publishing and republishes births when the host comes back online.
Step 3: Configure MQTT Engine as Primary Host
- Open Config > MQTT Engine > Settings.
- On the General tab, set Primary Host ID to the same value,
IgnitionHost. Engine will publish its STATE message as a retained message, which tells edge nodes a host is listening. - On the Servers tab, add the same broker. In production use a separate credential set from the Transmission side: two modules on two gateways are two distinct MQTT clients.
- On the Namespaces tab, leave the default Sparkplug B namespace enabled.
Save and open the Designer. Under the MQTT Engine tag provider you will find Edge Nodes/cmqdemo-4kz9/Line1/Filler with all four tags and their values. Change Temperature on the edge side and the Engine tag follows within a moment.
Step 4: Verify the Ignition MQTT Traffic Independently
When something goes wrong, you want to see the broker's view, not only Ignition's. Sparkplug B payloads are Protobuf-encoded, so a raw subscriber shows binary data, but the topics alone tell you a lot:
mosquitto_sub -h broker.connectmq.com -p 1883 -i ign-watch-4kz9 \
-t 'spBv1.0/cmqdemo-4kz9/#' -t 'spBv1.0/STATE/#' -v
You should see, in order: the host's STATE message, NBIRTH for Line1, DBIRTH for Filler, and then DDATA messages whenever tag values change. If you see repeated births without data, the edge node keeps reconnecting, usually because of a client ID conflict.
To decode payloads in your own code, follow the decode Sparkplug B with Python tutorial. On a private ConnectMQ broker the portal does this for you: the live topic explorer decodes Sparkplug B into readable metrics, and the broker can republish Sparkplug data into ISA-95 style topics. For example, spBv1.0/factory1/DDATA/line1/cnc1 is republished as connectmq/factory1/production/line1/cnc1/telemetry, so dashboards and scripts that do not speak Sparkplug can subscribe to plain topics.
Sparkplug Message Flow at a Glance
| Message | Published by | Purpose | Retained |
|---|---|---|---|
| STATE | MQTT Engine (primary host) | Host online or offline | Yes |
| NBIRTH / DBIRTH | MQTT Transmission | Full metric list with types and current values | No |
| NDATA / DDATA | MQTT Transmission | Changed values only | No |
| NDEATH | Broker, as the edge node's Last Will | Edge node offline | No |
| DDEATH | MQTT Transmission | Device offline | No |
| NCMD / DCMD | MQTT Engine | Writes and rebirth requests | No |
Understanding this table solves most Ignition MQTT puzzles. Tags in Engine go stale on NDEATH, and a rebirth request from Engine refreshes everything after a gap. The Sparkplug B payload guide explains the metric structure in depth.
Moving to Production
Before you connect a real site:
- Use a private broker with TLS. Switch URLs to
ssl://...:8883and use issued credentials for every module instance. - Choose meaningful Group and Edge Node IDs. They become the backbone of your namespace; align them with site and line names.
- Tune Transmission. Use tag deadbands in Ignition so DDATA carries real changes, and consider the store-and-forward options in Transmission for unreliable links.
- Check broker limits against your design. Sparkplug uses QoS 0 for data and QoS 1 for STATE and death messages, plus retained STATE. Plan connection counts: each module instance on each gateway is one client.
- Lock down writes. Engine can write to edge tags through DCMD. Decide whether that is allowed, and restrict writable tags on the edge.
- Monitor the host and edges. Alert on NDEATH and on STATE going offline, not only on process values.
If you prefer not to operate brokers at each control center, ConnectMQ as a hosted MQTT broker handles certificates, updates and flood protection for you. For the broader SCADA design questions, see MQTT in SCADA systems and the industrial IoT with MQTT guide.
Troubleshooting
- Server shows disconnected. Wrong URL scheme (
tcp://versusssl://), firewall on the port, or wrong credentials. - Edge connected but no births. Primary Host ID set on Transmission but Engine is not connected or uses a different ID, so the edge waits for STATE.
- Births repeat every few seconds. Two clients share a client ID, or two Transmission instances publish the same Group and Edge Node IDs.
- Engine tags show bad quality. The edge sent NDEATH or the host requested a rebirth that never arrived. Check the edge gateway's logs.
- Nothing on the public broker. Check that the public broker limits fit your test: 10 messages per second per client and 64 KB per message.
Connect Ignition to ConnectMQ
Give your Ignition gateways a shared, always-on broker that decodes Sparkplug B for you. Create a free Serverless broker at app.connectmq.com, no credit card needed, paste the URL and credentials into MQTT Transmission and Engine, and watch your tags appear in the topic explorer. Prefer to experiment first? The public MQTT test broker works with the lab setup above.
Frequently Asked Questions
Do I need MQTT Distributor if I use an external broker?
No. Point MQTT Transmission and MQTT Engine at the external broker and disable or remove the Distributor server entries.
Can Ignition publish plain JSON instead of Sparkplug B?
MQTT Transmission is built around Sparkplug B. For custom JSON topics, Cirrus Link offers a separate module, or you can publish from gateway scripts with a standard MQTT client.
Why do my MQTT Engine tags go stale?
Usually because the edge node disconnected and its NDEATH was published, or the host and edge use different Primary Host IDs. Check the server status on both sides.
Does the free plan support Sparkplug B?
Yes. Sparkplug needs QoS 0 and 1 and retained messages, which the free Serverless plan supports, within its connection and message size limits.



