Troubleshooting
Why MQTT Engine shows connected but MES data never arrives
Short answer
MQTT Engine reports Connected only for the broker in its own server entry, not for the broker your MES publishes into. If the MES writes into the local MQTT Distributor while Engine still points at a previous remote broker, nothing arrives, because brokers do not forward to each other without bridging. Add the local Distributor as an Engine server entry, match a custom namespace filter to the MES topic, and keep MQTT Transmission off the receive path.
On this page
- Where an MES message can stop on the way to Engine
- Why Connected does not promise your topics
- Prove the publish path before you touch Engine
- Worked example: a line MES publishing into the gateway's own Distributor
- Point Engine at the local Distributor
- Confirm the data flows without Transmission
- The decision for each case
- Questions asked
MQTT Engine reports Connected only for the broker in its own server entry, not for the broker your MES publishes into. A typical failure: the MES writes successfully into the MQTT Distributor running on the local gateway, while Engine still carries the server entry from when that gateway published to a remote broker. Two brokers with valid client sessions never exchange messages unless you configure bridging, so nothing arrives even though every status flag looks green. The fix: add the local Distributor as an Engine server entry, match a custom namespace filter to the MES topic level for level, and keep MQTT Transmission off the receive path. Transmission is a publishing client, and in the case this pattern comes from, data kept flowing after it was removed.
Where an MES message can stop on the way to Engine #
MQTT has no point-to-point path between a publisher and a subscriber. Every message lands on exactly one broker, and only clients subscribed on that same broker receive it. That gives you five hops to check, in order:
- The MES publisher client — the broker host, listener port, credentials, and the exact topic string it writes.
- The network path — routing and firewall rules from the MES to the gateway on the Distributor's listener port.
- The MQTT Distributor on the local gateway — listener enabled, MES user authenticated, publish permission on the topic.
- MQTT Engine's server entry — it must target this same Distributor, and its custom namespace filter must match the MES topic.
- The Engine tag provider — tags appear under the custom namespace's folder.
If the MES never connects at all, the fault sits in hops 1 to 3 and Engine is the wrong place to look; work it with the same method as fixing a PLC MQTT client that never reaches your broker. In the case this article resolves, hops 1 to 3 were healthy — the MES reported successful publishes — so the fault sat at hop 4.
Why Connected does not promise your topics #
Engine's status is the session state of exactly one server entry: the TCP connection opened and the broker accepted the MQTT CONNECT with the configured credentials. It says nothing about which topics that broker carries. A broker forwards nothing to another broker unless you configure bridging, so a connected Engine on the wrong broker and a busy Distributor on the local one stay isolated from each other.
A gateway that used to publish upstream is the classic setup for this. The old server entry survives the role change, Engine connects to the remote broker cleanly, and the local Distributor now receiving MES data has no subscriber at all.
| Symptom | Likely cause | Deciding check |
|---|---|---|
| Engine shows Connected, custom namespace stays empty | Server entry targets a different broker | Compare the Engine entry's host and port with the MES publish target |
| Entry points at the right broker, tags still missing | Namespace filter does not match the topic | Compare filter and topic character for character; topic names are case-sensitive |
| An external client sees the topic, Engine does not | The Distributor's access list blocks subscribe for Engine's user | Subscribe from an external client using Engine's own credentials |
| Nothing visible in the external client either | MES publishes to another broker, or not at all | Correct the MES broker settings before touching Engine |
For the third row, give Engine's user explicit subscribe rights the way writing MQTT Distributor ACL topic filters for Sparkplug B lays out: the access list needs an entry for every topic Engine must receive.
Prove the publish path before you touch Engine #
An independent client splits the path in half: what it sees is on the broker, and what it does not see never arrived. Use a desktop client such as MQTT Explorer.
- Connect to the gateway address and the Distributor's listener port, using the scheme the listener is configured for, plain or TLS.
- Log in with a Distributor user you control.
- Subscribe to
#so every topic on that broker shows up. - Trigger the MES publish and confirm the topic tree shows the topic and its payload.
- Write down the exact topic string, level by level — the namespace filter depends on it.
- Reconnect using the credentials Engine itself uses and repeat the subscription. If the topic vanishes, the access list for that user is the fault, not the publish path.
If even step 4 shows nothing, the publisher is the problem. When that publisher is an Ignition gateway whose tag writes happen but never leave as messages, the fix belongs on its side: work through troubleshooting Ignition tag rewrites that MQTT never publishes.
Worked example: a line MES publishing into the gateway's own Distributor #
The inputs: the component roles come from the case this article resolves, while every address and topic name below is an illustrative example, so read the real values from your own listener settings and MES configuration.
- MES publish target: the gateway running the Distributor, for example 192.168.1.50, on the listener port, for example 1883, the port registered for plain MQTT.
- MES topic root: for example
mes/line1, with leaves such asmes/line1/oeeandmes/line1/count. - Engine server entry: the previous remote broker, for example 10.0.20.10 on the same port, status Connected.
- Custom namespace filter: for example
mes/line1/#.
The rule in words: a publisher and a subscriber exchange data only when both connect to the same broker and the subscriber's filter matches the published topic. Engine's status describes only the server in its own entry, and no broker forwards to another without bridging.
The comparison, field by field: the MES publishes to 192.168.1.50 on port 1883, and Engine connects to 10.0.20.10 on the same port. The port matches; the host does not, because the two addresses differ — so the clients hold sessions on two different brokers. Topics shared between those brokers: 0, because neither forwards. Tags Engine can build from the MES data: 2 valid sessions multiplied by 0 shared topics gives 0 tags. The filter check passes independently: mes/line1/oee against mes/line1/# matches, because the first two levels are equal and the multi-level wildcard covers the rest.
Result: hops 1 to 3 pass, hop 4 fails on the host comparison, and the namespace filter was never the problem.
Decision: an Engine server entry is correct only when its host and port equal the MES publish target exactly. Any other combination, however green the status, carries no MES data — so point Engine at the local Distributor and leave Transmission out of the receive path, as the next two sections show.
Point Engine at the local Distributor #
- In the gateway configuration, open the MQTT Engine module's server settings and list every server entry.
- Identify entries that target the broker this gateway used to publish to. They describe a role this gateway no longer has.
- Add a server entry for the local Distributor: the loopback or gateway address, the Distributor's listener port, and a Distributor user with subscribe rights on the MES topics.
- Remove the stale remote entry, or disable it if this gateway still consumes something from that broker. A leftover active entry keeps a second session open and muddies every later diagnosis.
- In the namespace settings, leave the default namespaces disabled while the MES publishes plain custom topics; enable a default namespace only when a device actually sends Sparkplug B data, the format that announces each node with a DBIRTH once at connect — why Sparkplug B sends DBIRTH once and DDATA only on change covers that behavior.
- Confirm the custom namespace filter matches the captured topic string level for level, and that the namespace's payload handling expects the format you saw in the external client.
- Save, then confirm the local entry reports Connected.
If Transmission was installed as a workaround, remove it once the path above is proven. One planning note: removing modules and restarting the gateway interrupts live tags, so schedule it in a maintenance window.
Confirm the data flows without Transmission #
Work down this list after the change:
- In the Engine server settings, confirm only the intended entries remain and the local Distributor entry shows Connected.
- In your design client's tag browser, open the Engine tag provider and confirm the custom namespace folder holds tags matching the MES topic structure.
- Trigger a fresh MES publish and watch the tag value and timestamp move.
- Keep the external client subscribed to
#during the same publish; the payload on the broker and the tag value in Engine must agree. - Restart the Engine module or the gateway in the planned window, then confirm the local entry reconnects on its own.
In the case this pattern comes from, data kept flowing after Transmission was removed, which is the proof that Engine alone is the receiving side.
The decision for each case #
- External client sees nothing: fix the MES broker settings first, and leave Engine untouched until the traffic is visible on the broker.
- External client sees the topic but Engine does not: fix the subscribe rights for Engine's user on the Distributor.
- Subscribe rights are fine and tags are still missing: the server entry points at the wrong broker — add the local Distributor entry and retire the stale one.
- Entry and rights are both fine: align the namespace filter and payload handling with the captured topic and payload.
- Transmission is installed: remove it once Engine's own path works, and add it only when this gateway must publish its own tags upstream.
Questions asked
Was MQTT Transmission really needed to receive the MES data?
No. Transmission is a publishing client: it builds edge nodes from gateway tags and pushes them to a broker, so it has no role on the receiving side. Data that appears right after you install it comes from whatever else changed at the same time. In the case this article resolves, the Engine server entry was corrected, and the data kept flowing once Transmission was removed.
Can I keep the old remote broker entry after adding the local one?
Engine can hold several server entries and keeps a separate session to each, so the old entry will not break the new one. Remove or disable it anyway unless this gateway still consumes topics from that broker: every extra session adds broker traffic and makes it harder to tell which broker feeds which tags.
Which port should the Engine server entry use?
The Distributor listener's port, read from the listener settings. The registered defaults are 1883 for plain MQTT and 8883 for MQTT over TLS, but a listener can be configured on any port. The MES connection and the Engine entry must use the same value, because a port mismatch splits the traffic exactly as a host mismatch does.
Can the MES and MQTT Engine share one broker user?
Give each client its own user where you can. The proof in this article, subscribing once with your own user and again with Engine's credentials, only works when they differ, and separate users let the broker's access rules and logs point at the client that actually failed.