MQTT and OPC/UA are two of the communication protocols used in industrial automation for IoT services. There are numerous types of architectures and configurations possible with these two, which makes engineering robust and efficient to operate.
MQTT and OPC UA Architectures

So, the programmers must understand how to use both these powerful technologies to make industrial automation communication more reliable to operate. In this post, we will see various architectures that are possible using MQTT and OPC / UA.
OPC UA – Edge Gateway – MQTT
This is one of the simplest ways to understand both the protocols. Consider you have the following devices – SCADA PC, edge gateway, and MQTT broker. The SCADA has all the tags communicating with the PLC, so in short, the PLC tags need to communicate with the MQTT broker.
To communicate from SCADA to MQTT, the SCADA will first communicate data to its internal OPC server, where the tags will be published for server exposure. The SCADA PC is connected to the edge gateway ( a device with a SIM card or a LAN slot for network connectivity) via LAN cable.
Due to this, the edge gateway connects with the SCADA PC by recognising its endpoint OPC server, and converts the data into JSON format. The gateway then publishes the data to the MQTT broker with the topic name and JSON payload configured in it. The MQTT broker is thus sitting here in the cloud network. For reception, the same data flow will happen in the reverse direction. Note that an OPC server is not required if the SCADA software itself supports MQTT module configurations.
PLC with Native MQTT and Native OPC
Modern PLCs nowadays have both MQTT and OPC native or built into them. But remember that both are different communication channels and do not talk directly with each other. OPC exposes PLC tags for SCADA, HMI, Historian, gateway, and other devices that need PLC data for their work in its corresponding language. MQTT publishes the tags to MQTT brokers only.
Now, the PLC must have network connectivity like an Ethernet port, Wi-Fi, or a SIM card to connect to the MQTT broker. All the topic names and payloads are configured inside the PLC directly. A SCADA can connect to a PLC directly without OPC, but using OPC here has the following advantages –
- OPC allows rich data structures like arrays, structs, metadata, units, etc.
- OPC also supports alarms and events natively.
- OPC supports TLS encryption, authentication, and signed messages; and
- When multiple clients are reading the same PLC, then exposing tags to OPC is much better.
So, it all depends on the design and requirement.
OPC UA Aggregator – MQTT
This is a more advanced version of OPC used for large-scale plants. The OPC UA aggregator is a single OPC server that is installed in a central PC and collects OPC UA data from all the plant PLC or SCADA systems. That server is the only link to the MQTT broker, and not the individual OPC servers distributed across the plant.
From the individual data collected from the corresponding plant OPC UA devices, the corresponding topic names are created by this aggregator PC and merged into a single unified OPC UA namespace before sending it to the MQTT broker.
So, if your plant has multiple OPC UA devices and each wants to send data to the MQTT broker, this setup works as the aggregator unifies tag mapping, structuring, data cleansing, adding time stamps, quality codes, and uniform topic naming. Without this, the data becomes unmanageable at IoT scale.
Aggregator maintains one stable MQTT uplink (meaning one MQTT connection to the cloud, but publishes many topics under a clean hierarchy) instead of multiple uplinks and connections to the MQTT broker.
OPC UA – MQTT broker at the edge gateway
This architecture is similar to the first one that we saw earlier, with the only difference being that the MQTT broker is available right on the edge gateway device instead of the cloud network. So, the OPC will push data to this edge gateway device as earlier, but the MQTT broker is available here only, instead of sitting somewhere in the cloud network.
After this gateway, if data needs to be pushed to any cloud platform, then it’s an optional service for business-level purposes. If the cloud is offline, the edge broker continues working normally and keeps all MQTT data flowing locally. So we can see that, as the MQTT broker is independent of any cloud network, any local device can still subscribe through MQTT and get the data even if the cloud is offline.
Designing OPC and MQTT architecture, this totally depends on the scalability, reliability requirements, efficiency of the plant operation, and data management requirements for the programmers.