Troubleshooting
When an edge gateway has no MQTT subscribe function
Short answer
An IIoT secure interface gateway whose software shows only Broker Configuration and Publish has no MQTT receive function: the link is outbound telemetry only, and a connected broker proves nothing about subscriptions. Keep it as a telemetry link, or put the subscription on a separate documented endpoint when cloud-to-machine commands are required.
On this page
An IIoT secure interface gateway whose MQTT screen offers only Broker Configuration and Publish has no receive function: subscription is not integrated, the link runs from the gateway out to the cloud, and no broker-side setting adds the missing half. A green connection status proves credentials and network reachability, nothing about receiving. Split the commissioning accordingly: accept the link as outbound telemetry and document it that way, and when the application needs cloud-to-machine commands, put the subscription on a second documented endpoint instead of waiting on a firmware update.
Read the installed software, not the datasheet #
Start in the project, not the PDF. A working receive function needs two documented pieces: a control that registers a topic filter with the broker, and a mapping that turns a received payload into application data in the controller. The MQTT screen on this gateway class shows Broker Configuration and Publish and nothing that satisfies either piece, so the installed function set is publish-only.
Before you conclude that, record:
- The gateway model, firmware revision, and engineering-software version in use, because a screen layout is only true for the version that shows it.
- The MQTT controls the matching project actually exposes, listed by their on-screen names.
- Whether the documentation for those exact versions names a subscribe control and a received-payload mapping; a general claim that the product supports MQTT is a publish claim until then.
A newer release changes nothing until its own documentation names both pieces for your model, so treat each release as a capability check rather than a remedy.
Why the broker cannot supply the missing half #
Under the OASIS MQTT specification, v3.1.1 and v5.0 alike, receiving is an explicit client act: the client asks the broker to register a topic filter, and only a client with a registered filter has matching messages forwarded to it. Publishing and subscribing are independent operations that one client may perform over a single connection, which is the fact behind how MQTT clients publish and subscribe through one broker; a gateway that only publishes is not half-connected, it is whole in one direction.
The broker authenticates clients, applies topic permissions, and distributes messages to subscribers. None of those jobs issues a subscription on a client's behalf. An access-control entry that permits subscribing makes the request possible; it cannot make software send the request or interpret the reply. The quality-of-service handshake confirms delivery between client and broker, never that an application acted on a payload, which matters when a cloud platform reports a command as sent.
Prove the outbound path with a counted test #
Separate the missing feature from a broken connection before touching architecture. Publishing either works or it does not, and the test is countable:
- In Broker Configuration, enter the approved credentials and security settings, then confirm the connection in the gateway or broker diagnostics. A connection failure is a different fault: fix network reachability, authentication, or TLS there.
- In Publish, configure one noncritical telemetry tag on a single topic.
- From a diagnostic MQTT client holding read permission on that topic, subscribe and log everything.
- Count the messages, compare payloads, then publish one test command to your intended command topic and read the broker's delivery count.
Worked example, illustrative values you set for the test:
- Publish cadence: 30 s. Test window: 60 min.
- 60 min × 60 s/min = 3,600 s.
- 3,600 s ÷ 30 s per message = 120 messages expected.
- The client logged 120, with the payload stepping once per message: outbound path accepted.
- The command message matched 0 subscriptions: receive gap confirmed, recorded as evidence rather than chased as a fault.
Run this against a broker you control, so the access-control list and the delivery logs are yours to read; running an MQTT broker in the PLC or on a separate device covers where to put one.
Decide: telemetry-only or bidirectional #
A publish-only gateway is a finished design for telemetry and an unfinished one for commands. Take one position and write it into the commissioning record:
| Requirement | Decision | Acceptance reading |
|---|---|---|
| Cloud telemetry only | Keep Broker Configuration and Publish; label the link outbound-only in the project documentation | Diagnostic client receives every configured value |
| Cloud-to-machine commands | Add a second endpoint with a documented subscription and payload mapping; the gateway keeps telemetry | Test command reaches the controller through that mapping only |
| A later release might add subscribe | Not a commissioning decision; re-check that release's documentation before upgrading anything | Release notes name the control and the mapping for your model |
Command paths also fail quietly above the gateway: Sparkplug B sends data but receives no SCADA commands walks the platform-side half of a dead downlink. On this gateway, rule in the absent subscription first, because it is the one cause you can see in the software.
Build the return path on a second endpoint #
When commands are required, the subscription lives where the installed software supports one. Three placements are common:
- An edge computer beside the gateway, running a documented MQTT client or flow engine that subscribes to the command topic and writes to the controller over a supported local path; bridging OPC UA PLC data to MQTT with an edge PC is the same pattern run in the other direction. Mount it as a fanless mini PC in the control cabinet.
- A module on an edge platform whose base edition publishes only, with subscription and writeback added by a documented add-on; how an edge module adds MQTT subscribe and writeback shows that arrangement end to end.
- A subscriber inside the SCADA or MES layer, when a supported machine interface already exists there.
Verify the machine-side interface before selecting the endpoint: an MQTT message arriving on another box is not, by itself, a path into the controller.
One rule closes the design. Keep command authorization, range checks, and machine-state permissives in the receiving application, because a delivery handshake says nothing about execution and remote commands never replace the machine's safety functions. Under IEC 62443-3-2, the new endpoint is a conduit into the zone, so assess it in the zone-and-conduit model instead of bolting it on.
What each reading means #
- Gateway will not connect: outbound is not yet working; check broker address, credentials, certificates, and network reachability.
- Connected but no telemetry at the client: connection never proved publication; check the publish topic, payload mapping, and broker permissions.
- Client receives 120 of 120 with matching payloads: outbound accepted; close the telemetry branch and document the link as one-way.
- Command message matched 0 subscriptions: receive gap confirmed at this gateway; move to the decision table.
- Second endpoint receives and the controller tag moves only through its documented mapping: return path accepted; commission commands with authorization and permissives in place.
Questions asked
Can the broker's permission settings make the gateway subscribe?
No. An access-control entry permits the client to request a subscription; it cannot make the gateway's software send that request or interpret an incoming payload. If you publish a test command while only the gateway is connected, the broker's delivery count shows zero matching subscriptions, which is the capability gap, not a permission fault.
Will a future firmware update add subscribe support?
Treat any update as a capability check, not a remedy. Before changing software on a running line, read the release documentation for your exact gateway model, firmware revision, and engineering-software version, and look for a named subscribe control plus a description of how received payloads map to application data. Until both are documented, the link stays outbound-only in the commissioning record.
Can commands ride back down the topic the gateway publishes on?
No. A topic is a message label, not a register. If the broker allows another client to publish to the gateway's outbound topic, that message waits with no subscriber reading it, because the gateway never registers a subscription on any topic. Commands need an endpoint that subscribes and maps payloads into the controller through a documented interface.
Where should the subscribing endpoint sit?
Next to the machine or in a DMZ between OT and cloud, inside a conduit you have assessed under your zone-and-conduit model. A subscriber running in the cloud still needs a supervised path into the controller, so most sites run the client on an edge box beside the gateway and write to the controller over a local, supported interface.
Does Sparkplug B change any of this?
No. Sparkplug B adds topic structure and state discipline on top of MQTT, with birth and death certificates and rebirth requests, but its commands are still messages delivered to subscribed clients. A gateway that never subscribes cannot receive them, so a Sparkplug B deployment keeps the same split: a publish-only device outbound, and the subscription on a separate endpoint.