OPC UA vs MQTT: When to Use Each in an Industrial Architecture
Every industrial architecture discussion eventually reaches the same fork: OPC UA or MQTT. The short answer is that they are complementary, not competing - but choosing the wrong one for a layer costs real integration time.
What Each Protocol Is Good At
OPC UA is a client-server information model. It exposes typed, self-describing data - machines, tags, methods, alarms - with built-in security (signing and encryption) and session semantics. It is the standard for controller-to-supervision data exchange and vendor-neutral access to plant floor data.
MQTT is a lightweight publish/subscribe transport designed for many-to-many messaging over unreliable networks. A broker decouples producers from consumers, which makes it ideal for moving data out of the plant to dashboards, historians, and cloud platforms.
Decision Framework
- Read/write structured data from PLCs, CNCs, or drives in a control network: OPC UA.
- Stream telemetry from many edge devices to a central platform over WAN or mobile links: MQTT.
- Publish machine state to an ERP or cloud analytics stack: MQTT with a well-defined payload schema (for example Sparkplug B).
- Replace proprietary OPC DA interfaces in an existing SCADA: OPC UA.
The Common Pattern
Most modern deployments use OPC UA from the controller layer up to an edge gateway, then MQTT from the gateway to the platform. The gateway performs the translation once, which keeps the control network stable and the IT side decoupled. This hybrid is easier to maintain than forcing either protocol to do both jobs.