OPC UA vs Modbus vs MQTT: which protocol, and when?
OPC UA, Modbus and MQTT are the three protocols you are most likely to meet in industrial and IoT projects. They solve different problems, and most sites use more than one.
Modbus: simple and everywhere
Modbus was first published in 1979 and is still found in meters, drives, PLCs and sensors. It uses a simple request/response model over serial lines (Modbus RTU) or Ethernet (Modbus TCP).
- Strengths: simple, widely supported, low overhead.
- Limitations: no built-in data model or security; registers need a map to make sense.
OPC UA: rich models and built-in security
OPC UA (Unified Architecture) is a platform-independent industrial standard maintained by the OPC Foundation. It exposes data with structure and meaning, not just raw values, and includes authentication and encryption.
- Strengths: information models, security, discovery and wide adoption in modern machines.
- Limitations: more complex to configure; older equipment may not support it.
MQTT: lightweight publish/subscribe
MQTT is a lightweight protocol where devices publish messages to a broker and applications subscribe to the topics they need. It is popular for IoT devices, gateways and cloud connectivity, and Sparkplug B adds a standard structure for industrial use.
- Strengths: efficient over unreliable networks, decouples producers and consumers, scales well.
- Limitations: the payload format is not standardised unless you use a specification such as Sparkplug B.
Side by side
- Communication model: Modbus uses request/response; OPC UA uses client/server and pub/sub; MQTT uses publish/subscribe through a broker.
- Meaning of the data: Modbus exposes raw registers; OPC UA exposes structured information models; with MQTT it depends on the payload.
- Security: Modbus has none built in; OPC UA has it built in; MQTT relies on TLS and broker authentication.
- Typical place: Modbus in field devices and meters; OPC UA in machines and controllers; MQTT in gateways, IoT devices and the cloud.
Which one should you use?
Usually, the one your equipment already speaks. In practice, a site might read meters over Modbus, machines over OPC UA and sensors over MQTT, and then bring all of it into one model.
How ALLINLET handles all three
ALLINLET includes connectors for Modbus TCP, OPC UA, MQTT and MQTT Sparkplug B, alongside hundreds of other protocols, and normalises their data into one stream, so applications don't need to care which protocol a reading came from.
Frequently asked questions
Can MQTT replace OPC UA?
They are often complementary: OPC UA describes machine data in detail, while MQTT moves data efficiently between systems. OPC UA also defines a PubSub mode that can run over MQTT.
Is Modbus secure?
Classic Modbus has no built-in authentication or encryption, so it should run on segmented networks. Secure variants and gateways can add protection.
ALLINLET connects to IoT sensors and industrial systems through 900+ connectors across 22 domains, and delivers one clean data stream, in our cloud or in your own infrastructure.