OPC UA vs MQTT: Protocols for IIoT Gateways and Industrial Data
OPC UA and MQTT do different jobs, which is why most connected plants use both. How each works, a row-by-row comparison, Sparkplug B and the unified namespace, gateway architectures, IEC 62443 security and how to size the edge hardware.
OPC UA vs MQTT is one of the most common protocol questions in industrial data integration, and the honest answer is that the two do different jobs. OPC UA is an industrial interoperability standard that describes machine data, with its meaning, types and structure, and lets software browse, read, write and call it securely. MQTT is a lightweight publish and subscribe messaging protocol that moves messages through a broker, with no opinion about what those messages contain.
That difference is why most connected plants end up using both. OPC UA sits close to the machines, where controllers and equipment from different makers need a common, self-describing model. MQTT carries the data north, from the IIoT gateway at the cabinet to plant systems and the cloud, often with the Sparkplug B specification adding the structure that plain MQTT leaves out. The point where the two meet is usually an edge computer that also has to talk Modbus, PROFINET or EtherNet/IP to older equipment.
This guide is the reference view. It explains how each protocol works, compares them row by row, shows where each sits between IT and OT, sets out the common gateway architectures and the security model, and sizes the hardware that runs them. For the wider picture of connected industry, start with our explainer on the industrial internet of things.
Key takeaways
- 01Different layers, not rivals
- OPC UA defines what data means and how to access it; MQTT defines how messages travel. Comparing them is closer to comparing a data model with a delivery service.
- 02OPC UA at the machine
- Client/server access, browsable information models and companion specifications suit PLCs, machines and SCADA on the plant network.
- 03MQTT to the enterprise
- A broker decouples publishers from subscribers, so many systems can share the same data over limited or intermittent links.
- 04Sparkplug B closes the gap
- It adds a topic structure, a typed payload and device state to MQTT, which plain MQTT does not define.
- 05The gateway does the hard work
- Protocol conversion, data modelling, buffering and certificates all live on the edge computer, so size it for the job.
What OPC UA is
OPC UA (Open Platform Communications Unified Architecture) is published by the OPC Foundation and standardised as IEC 62541. It was first released in 2008 to replace OPC Classic, whose Data Access specification depended on Microsoft COM/DCOM and therefore on Windows. OPC UA runs on any operating system, from a small Arm gateway to a server, and its native binary protocol uses TCP port 4840 by default.
Client/server and the address space
In its classic form OPC UA is client/server. A server, often built into a PLC or running on a gateway, exposes an address space: a structured graph of nodes for objects, variables, methods and the references between them. A client connects, browses that graph and reads, writes or subscribes to what it needs. Variables carry metadata such as data type, engineering range, scaling and timestamps, so a value arrives with its meaning attached.
| Service set | What it does | Typical use |
|---|---|---|
| Discovery | Finds servers and lists their endpoints and security settings | Commissioning a client against a new machine |
| Session and secure channel | Authenticates the application and user, then signs and encrypts the connection | Every connection |
| View (browse) | Walks the address space so a client can see what the server offers | Engineering tools, auto-configuration |
| Attribute (read and write) | Reads or writes values and their metadata | Set points, recipe parameters |
| Subscription and monitored items | Server reports changes at a sampling interval, with optional deadband | HMI, SCADA and historian data collection |
| Method | Calls a function on the server, such as start a job | Machine commands from MES |
| Alarms and conditions | Structured alarm and event notifications with acknowledgement | Alarm handling in SCADA |
| Historical access | Queries stored values and events by time range | Backfilling a client after an outage |
Information models and companion specifications
The real strength of OPC UA is information modelling. Types can be defined once and reused, so every pump, robot or packaging machine of a given kind can present the same structure. Industry groups publish these as companion specifications: OPC UA for Machinery, PackML, EUROMAP for plastics and rubber machinery, robotics, process automation devices and many more. A client written against a companion specification can, in principle, work with any conforming machine without a custom mapping. This is also what makes OPC UA a common foundation for a digital twin of an asset.
Beyond client/server: PubSub and FX
OPC UA is not only client/server. Part 14 of the specification, PubSub, lets a publisher send datasets to many subscribers without sessions, either over UDP (often on Time-Sensitive Networking for deterministic traffic between controllers) or through a broker using MQTT or AMQP, with a compact binary (UADP) or JSON encoding. Reverse Connect lets a server inside a protected network open the connection outwards to a client, which helps with firewalls. The OPC UA FX (Field eXchange) extensions take OPC UA towards controller-to-controller and field-level communication; adoption there is still early, and most deployments today use classic client/server.
Security built into the protocol
Every OPC UA application has its own X.509 application instance certificate. When a connection opens, client and server agree a security policy (for example Basic256Sha256 or the newer Aes256_Sha256_RsaPss) and a message security mode of None, Sign or SignAndEncrypt, then authenticate the user by anonymous login, user name and password, certificate or token. Certificates are trusted per application, and a Global Discovery Server can manage them across a site. The protocol defines all of this, so a correctly configured system is secure without extra layers; the catch is that certificate management has to be planned.
What MQTT is
MQTT was designed in 1999 by Andy Stanford-Clark of IBM and Arlen Nipper for monitoring oil pipelines over satellite links, where bandwidth was expensive and connections dropped. It is now an OASIS standard: version 3.1.1 (2014, also published as ISO/IEC 20922) and version 5.0 (2019). It runs over TCP/IP, on port 1883, or 8883 with TLS, and its smallest packet header is 2 bytes.
Broker, topics and publish/subscribe
Every MQTT client connects to a broker. A publisher sends a message to a topic, a text path such as site1/packing/line2/filler/temperature, and the broker forwards it to every client subscribed to that topic. Subscribers can use wildcards: + matches one level and # matches everything below. Publishers and subscribers never connect to each other and need not know each other exists, which is why adding a new consumer of plant data does not mean touching the machines.
Quality of service
MQTT offers three delivery levels, set per message. QoS applies to each hop, publisher to broker and broker to subscriber, and a subscriber can ask for a lower level than the publisher used.
| QoS level | Delivery guarantee | How it works | Typical use |
|---|---|---|---|
| QoS 0 | At most once | One PUBLISH, no acknowledgement | Frequent readings where the next value soon replaces a lost one |
| QoS 1 | At least once | PUBLISH and PUBACK; resent until acknowledged, so duplicates are possible | Most telemetry and alarms, with duplicate handling in the consumer |
| QoS 2 | Exactly once | Four-step PUBLISH, PUBREC, PUBREL, PUBCOMP exchange | Counts, commands or transactions where a duplicate would cause harm |
Retained messages, last will and sessions
Three features matter in industrial use. A retained message is stored by the broker as the last known value on a topic and delivered to any new subscriber straight away. A last will and testament is a message the broker publishes on a client’s behalf if that client disconnects unexpectedly, which is how other systems learn that a gateway has gone offline. A persistent session keeps a client’s subscriptions and queued QoS 1 and 2 messages while it is disconnected, so it can pick up where it left off.
MQTT 5.0 added user properties (key and value metadata on each message), shared subscriptions for load balancing, message and session expiry, reason codes, topic aliases and a request and response pattern. What MQTT still does not define is the payload. A message can be JSON, a binary blob or a plain number, and two publishers can describe the same temperature in different ways. That gap is what Sparkplug B fills.
Sparkplug B: giving MQTT a data model
Sparkplug is an open specification, now run by the Eclipse Foundation, that defines how industrial devices and applications should use MQTT. Version 3.0 was published in 2022 and has since been adopted as the international standard ISO/IEC 20237. “Sparkplug B” refers to its payload format, which is the one in use today.
Sparkplug fixes three things that plain MQTT leaves open. The topic namespace is defined as spBv1.0/group_id/message_type/edge_node_id/device_id. The payload is encoded with Google Protocol Buffers, with each metric carrying a name, data type, timestamp and optional properties, and an alias so repeated messages stay small. And state is managed: every edge node announces itself with a birth certificate, registers a death certificate as its MQTT last will, and numbers its messages so a host can spot a gap and ask for a rebirth.
| Message type | Sent by | Purpose |
|---|---|---|
| NBIRTH and DBIRTH | Edge node, device | Announces the node or device with every metric, its data type and current value |
| NDATA and DDATA | Edge node, device | Reports changed values only (report by exception) |
| NCMD and DCMD | Host application | Writes or commands, such as a set point or a rebirth request |
| NDEATH and DDEATH | Broker (as last will) or edge node | Marks the node or device offline so its data is shown as stale |
| STATE | Primary host application | Tells edge nodes whether the main SCADA or IIoT host is online |
The result is MQTT that a SCADA host or historian can consume without a custom mapping for each device: it discovers metrics from the birth messages, knows when data is stale and can send commands back. The trade-off is that Sparkplug models are flatter than OPC UA information models, and both ends must support the specification.
OPC UA vs MQTT compared
The table compares OPC UA in its usual client/server form with MQTT, noting where Sparkplug B changes the picture. Both are mature, open and secure when configured properly; they differ in where they put the intelligence.
| Aspect | OPC UA (client/server) | MQTT (with Sparkplug B where noted) |
|---|---|---|
| Standard | IEC 62541, OPC Foundation | OASIS MQTT 3.1.1 (ISO/IEC 20922) and 5.0; Sparkplug ISO/IEC 20237 |
| Architecture | Client/server sessions; PubSub option | Publish/subscribe through a central broker |
| Coupling | Client must know and reach each server | Publishers and subscribers only know the broker |
| Data model | Rich, typed, hierarchical information models; companion specifications | None in MQTT; Sparkplug adds typed metrics, flatter than OPC UA |
| Discovery | Built in: discovery services and browsable address space | Topics only exist once published; Sparkplug birth messages list metrics |
| Interaction | Read, write, subscribe, methods, alarms, history | Publish and subscribe; commands via topics (Sparkplug CMD) |
| Security model | Application certificates, security policies, Sign or SignAndEncrypt, user tokens | TLS on the connection, user name and password or client certificates, topic access rules at the broker |
| Delivery | Reliable TCP session; subscriptions queue changes for a short period | QoS 0, 1 or 2; retained messages; persistent sessions |
| State awareness | Session and server status | Last will; Sparkplug birth, death and STATE messages |
| Bandwidth | Compact binary encoding; heavier connection set-up | Very small headers; Sparkplug aliases and report by exception keep messages small |
| Latency | Milliseconds on a LAN; PubSub over TSN for deterministic exchange | Milliseconds on a LAN plus a broker hop; not deterministic |
| Network direction | Client opens connection to the server, unless Reverse Connect is used | Every client connects outwards to the broker |
| Default ports | 4840 | 1883, or 8883 with TLS |
| Tooling | Native in many PLCs; SDKs, browsers and gateway software | Many open source brokers and client libraries; native in most cloud IoT services |
| Typical place | Machines, cells, SCADA and MES on the plant network | Edge to site broker, enterprise and cloud |
Read across the rows and a pattern appears. OPC UA puts the intelligence in the server: the data model, the security and the history live with the machine, and any client can ask for what it needs. MQTT puts it in the broker and the topic design: the protocol stays small, and the system around it decides what the data means. Neither is faster or more secure in every case. On a plant LAN both deliver values in milliseconds, and both can be locked down, or left open, by configuration.
Where each sits in the Purdue model and ISA-95
Most sites describe their networks with the Purdue model, which the ISA-95 and IEC 62443 standards build on. Mapping the protocols onto it shows why they are complementary: OPC UA is strongest in the middle levels, where equipment has to be understood, and MQTT where data has to reach many consumers across a boundary.
| Level | What lives there | Typical protocols |
|---|---|---|
| Level 0–1: process and control | Sensors, actuators, drives, PLCs, remote I/O | PROFINET, EtherNet/IP, Modbus, IO-Link, 4–20 mA |
| Level 2: supervisory | HMIs, SCADA, cell controllers, edge gateways | OPC UA client/server; Modbus TCP; vendor protocols |
| Level 3: site operations | MES, historian, site MQTT broker, engineering servers | OPC UA, MQTT and Sparkplug B, SQL |
| Level 3.5: industrial DMZ | Brokers or relays that bridge plant and business networks | MQTT over TLS; OPC UA through a relay or Reverse Connect |
| Level 4–5: enterprise and cloud | ERP, analytics, data lakes, cloud IoT services | MQTT, HTTPS and REST, AMQP |
The levels are a reference, not a rule. Many PLCs now publish MQTT directly, and OPC UA is used up to the cloud through PubSub. But the boundary between level 2 and level 3, where an edge computer collects from the controllers and passes data upwards, is still where most of the protocol conversion happens. Our comparison of HMI and SCADA covers the supervisory layer in more detail.
When to use OPC UA, MQTT or both
Does the system that reads the data need to understand the machine, or only receive its values? That question settles most protocol decisions. Make it per data flow, not once for the whole site.
Choose OPC UA when
Systems need a shared, self-describing model of the equipment: a SCADA or MES that must read and write set points, call methods, acknowledge alarms or pull history. OPC UA also suits equipment that already ships with an OPC UA server, machines covered by a companion specification, and controller-to-controller exchange where PubSub over TSN gives deterministic timing.
Choose MQTT when
Many consumers need the same data, links are limited or intermittent, or data has to cross from the plant to business systems or the cloud. Over 4G or 5G, the small packets, outbound connection and persistent sessions of MQTT are a good fit, and our guide to 5G at the edge covers the network side. Add Sparkplug B when the consumers are SCADA or historian software that should discover metrics and track device state on their own.
Why most sites use both
A typical pattern reads the PLC and machine servers over OPC UA, and the older equipment over Modbus or a fieldbus, at an edge gateway. The gateway normalises the data, adds context and publishes it over MQTT, usually with Sparkplug B, to a site broker. SCADA, the historian, MES, maintenance tools such as AI predictive maintenance and the cloud all subscribe from there. OPC UA keeps its role for tasks that need a session with the machine, such as writing recipes or acknowledging alarms.
The unified namespace
That broker-centred pattern is often called a unified namespace (UNS): a single, event-driven hub where every system publishes its current state into a topic tree organised along ISA-95 lines (enterprise, site, area, line, cell) and every other system subscribes to what it needs. A UNS is an architecture, not a standard or a product. It replaces many point-to-point links with one hub, but it does not remove the need for OPC UA at the machines or for an agreed data model in the topics, which is where Sparkplug B or a site’s own naming rules come in.
How an OPC UA and MQTT gateway handles data
Whatever the protocols on each side, a gateway does the same five jobs. Most integration effort goes into the first two.
-
Connect
Southbound driversDrivers poll Modbus RTU over RS-485, Modbus TCP, PROFINET, EtherNet/IP and vendor protocols, or subscribe to OPC UA servers in the PLCs and machines.
-
Model
Context and namesRaw registers and tags become named, typed values with scaling, ranges and the asset they belong to, in an OPC UA model, Sparkplug metrics or a UNS topic.
-
Publish
Northbound protocolsThe gateway serves the model over OPC UA to local SCADA, and publishes changes over MQTT or Sparkplug B to the site broker or a cloud service.
-
Buffer
Store and forwardWhen the uplink drops, values are queued on local storage with their original timestamps and sent in order once the broker or host is back.
-
Secure
Certificates and updatesCertificates, keys and firewall rules are managed on the gateway, which is patched and monitored like any other system in the OT zone.
Gateway architectures
In practice the gateway is where protocols meet, and five patterns cover most deployments. Larger sites often combine them: protocol converters at the cabinets, an aggregation server or bridge per line, and an edge broker per site.
| Pattern | How it works | Suits | Watch for |
|---|---|---|---|
| Protocol converter | Gateway polls Modbus or fieldbus devices and publishes MQTT or Sparkplug B | Older equipment with no OPC UA; remote sites on cellular | Data model is only as good as the tag mapping |
| OPC UA aggregation server | Gateway collects from many devices and presents one OPC UA server with a combined model | SCADA and MES that expect OPC UA; mixed-vendor lines | Certificate trust between gateway, devices and clients |
| OPC UA to MQTT bridge | Gateway subscribes to OPC UA servers and republishes changes over MQTT or Sparkplug B | Feeding a site broker or UNS from modern PLCs | Mapping OPC UA structure into a flatter topic or metric model |
| Edge broker | Broker runs on the gateway or a site edge computer; local apps subscribe, and a bridge forwards upstream | Sites that must keep working when the WAN is down | Broker clustering and backup on larger sites |
| OPC UA PubSub over MQTT | Devices or gateway publish OPC UA datasets directly through an MQTT broker | Keeping OPC UA semantics end to end | Fewer consumers support it than plain MQTT or Sparkplug |
Protocol conversion from the fieldbus
Much of the data still comes from equipment that speaks neither OPC UA nor MQTT. Meters, drives and older PLCs often use Modbus RTU and Modbus TCP, with the serial version over RS-485; Siemens lines use PROFINET or S7, and Rockwell lines EtherNet/IP. A gateway reads these with polled drivers, so the poll rate and the number of registers per request set both the data freshness and the load on the device. Where a cabinet has no network-ready device at all, serial I/O modules and digital or analogue I/O bring the signals in.
Store and forward
A gateway that loses its uplink should not lose data. Store and forward means the gateway keeps publishing into a local queue on disk, with the original timestamps, and drains it in order when the connection returns. Sparkplug B supports this through the STATE message, which tells edge nodes when the primary host is offline so they can start buffering. OPC UA clients can instead backfill from a server’s historical access. Either way, size the local storage for the longest outage you plan to ride through.
Timestamps only help if the clocks agree. Synchronise gateways with NTP as a minimum, and with IEEE 1588 PTP where sequence of events matters across machines.
Securing OPC UA and MQTT at the gateway
The IEC 62443 series is the reference for industrial cyber security. Its system-level parts group assets into zones with the same security needs and control the conduits between them; component requirements (IEC 62443-4-2) and the supplier’s development process (IEC 62443-4-1) apply to the equipment itself. Choosing protocols and hardware with the right security features can support that work, but compliance depends on the whole system and how it is operated.
| Zone or conduit | Typical traffic | Controls |
|---|---|---|
| Control zone (level 0–1) | Fieldbus, Modbus, PROFINET, EtherNet/IP | Isolated network; no direct route to IT; read-only access where possible |
| Supervisory zone (level 2) | OPC UA client/server between SCADA, HMIs and gateways | SignAndEncrypt, trusted application certificates, named user accounts |
| Conduit: plant to site | MQTT or Sparkplug B to the site broker | TLS 1.2 or 1.3, client certificates, broker access rules per topic |
| Industrial DMZ (level 3.5) | Broker bridges or relays to business systems and cloud | No direct connections from IT to OT; outbound-only where possible |
| Conduit: site to cloud | MQTT over TLS to a cloud IoT service | Per-device certificates, least-privilege topics, certificate rotation |
OPC UA: use the security that is already there
OPC UA security fails most often by being switched off. Disable the None security mode and anonymous access on production servers, use current policies such as Basic256Sha256 or Aes256_Sha256_RsaPss, and decide before go-live who issues and trusts application certificates and how they are renewed. On larger sites a Global Discovery Server takes much of that work off individual devices.
MQTT: secure the broker and the connection
An MQTT deployment is as secure as its broker configuration. Require TLS on port 8883, authenticate every client by certificate or strong credentials, and give each client access only to the topics it needs, with publish and subscribe rights set separately. Because MQTT clients always connect outwards to the broker, a gateway in the OT zone needs no inbound firewall openings, which makes MQTT straightforward to route through a DMZ.
Hardware and network measures
Certificates and private keys are safer in a TPM 2.0 module than in a file on disk, and Secure Boot stops modified firmware or operating systems from starting. Two LAN ports let a gateway sit on separate OT and IT networks, but dual-homing is not segmentation on its own: disable IP forwarding, firewall both interfaces and keep VLANs and access lists on managed switches in the design. Our guide to managed vs unmanaged industrial switches covers the switching side. Remote sites benefit from out-of-band management so a gateway can be recovered without a site visit.
Hardware for OPC UA and MQTT gateways
Each part of the data path has a hardware category of its own, from the I/O that reads a sensor to the computer that runs the broker.
Industrial IoT gateways
Fanless gateways that read PLCs, meters and drives, convert protocols and publish over OPC UA or MQTT.
View rangeDIN rail PCs
Computers that clip onto the rail in the control cabinet, beside the PLC, I/O and power supplies.
View rangeData acquisition and I/O
Analogue, digital, serial and CAN modules that bring signals in where no networked device exists.
View rangeEthernet I/O modules
Remote I/O on the network, read by a gateway or controller over Ethernet.
View rangeManaged industrial switches
VLANs, access control and redundancy for separating control, supervisory and DMZ traffic.
View rangeEdge AI computers
Computers with a GPU or NPU for analytics and models that consume the same plant data.
View rangeSizing a gateway for OPC UA and MQTT
Protocol software is light compared with vision or AI, so most gateways are sized by tag count, update rate, local storage and the number of services they run, not by raw processing power. The table gives typical starting points; the right build depends on your devices, software stack and site.
| Gateway role | Typical hardware | Example from our range | Why it fits |
|---|---|---|---|
| Convert a few devices to MQTT, small OPC UA server | Arm gateway, 1–4 GB RAM, eMMC | DFI EC910-8MM | NXP i.MX 8M Mini quad-core Cortex-A53, 4 GB LPDDR4, two GbE, RS-485/422/232, optional LTE, TPM 2.0 on the WT-TPM build, −40 to 70 °C |
| Read 4–20 mA transmitters and publish | Arm gateway with analogue inputs | Neousys IGT-34C | Four 16-bit 4–20 mA inputs, Debian 9, two LAN ports with PoE+ input, mini PCIe for 3G, 4G or Wi-Fi, −25 to 70 °C |
| Edge broker, OPC UA aggregation and store and forward | x86 gateway, 8–16 GB RAM, NVMe | ASRock Industrial iEP-5020G | Intel Atom x7433RE, up to 16 GB DDR5 with In-Band ECC, NVMe, three LAN with TSN, 4G or 5G option, TPM 2.0, −40 to 70 °C |
| Site broker, historian and analytics in one cabinet | Core-class DIN rail PC, 32 GB or more, NVMe | ASRock Industrial iEP-7041E | Intel Core Ultra 5 225H with NPU, up to 96 GB DDR5, five LAN ports with 4G or 5G option, three COM, 4DI/4DO, redundant DC input |
A worked storage example
Say a gateway collects 2,000 tags that each change once a second, and stores each value with its timestamp and quality in about 50 bytes. That is 100 kB a second, or about 8.6 GB a day if the uplink is down. A week of buffering needs about 60 GB, which is beyond the eMMC on most small Arm gateways but comfortable on an NVMe SSD. Report by exception and deadbands usually cut the real figure a long way, so measure your own change rates before you size storage.
What else to check
Memory matters more than cores for a broker with many retained topics, persistent sessions or a local historian. Check the ports: enough isolated serial ports for Modbus RTU, two or more LAN ports for separate networks, and 4G or 5G where there is no wired uplink (our guide to 4G and 5G cellular computers covers modules and antennas). Check the environment: the industrial temperature range at the worst-case cabinet ambient, a wide DC input that matches the cabinet supply, and SSDs with power loss protection where power can drop without warning. Our articles on DIO vs GPIO and fog and edge computing go further on I/O and on where processing belongs, and our IoT edge gateway case study shows fanless gateways relaying machine data to a maintenance service.
Our wider ranges of industrial IoT gateways and data acquisition and I/O modules cover more processor, port and cellular combinations, and managed industrial switches handle the network segmentation. We configure every gateway with the operating system, protocol software, certificates and any cellular module you specify, then test it before it ships.
Gateways for OPC UA and MQTT
Four starting points from the table above: a secured Arm DIN rail gateway, a 4–20 mA gateway, an Atom edge gateway with 4G or 5G, and a Core Ultra DIN rail PC for site-level brokers.

NXP i.MX 8M Mini DIN Rail PC with 4x COM, 4GB, TPM and Extended Temperature
- CPU
- NXP i.MX 8M Mini
- Ethernet
- 2× GbE
- Temp
- −40 to +70 °C

TI Sitara AM3352 IoT Gateway with 4x 4-20 mA Analog Inputs and PoE PD
- CPU
- TI Sitara AM3352
- Ethernet
- 2×10/100 LAN [RJ45]
- Temp
- −25 to +70 °C

Intel Atom x7433RE Fanless Edge Gateway with Triple LAN and 4G/5G Option
- CPU
- Intel Atom x7433RE (Amston Lake)
- Ethernet
- 1× 2.5GbE, 2× GbE
- Temp
- −40 to +70 °C

Intel Core Ultra 5 225H DIN-Rail Embedded PC with Five LAN Ports and 5G Option
- AI
- 13 TOPS
- CPU
- Intel Core Ultra 2 Arrow Lake-H
- Ethernet
- 3× 2.5GbE, 2× GbE
Planning an OPC UA and MQTT gateway
Seven checks that decide whether a gateway project delivers usable data or a pile of unlabelled tags.
-
01
Device inventory
List every PLC, drive, meter and sensor with its protocol, address range and whether it already has an OPC UA server or MQTT client.
-
02
Data flows
Decide per flow who consumes the data and whether they need a model and methods (OPC UA) or a stream of values (MQTT).
-
03
Naming and model
Agree the topic tree or Sparkplug groups, the OPC UA model and companion specifications before mapping tags.
-
04
Update rates
Set poll and publish rates, deadbands and report by exception per tag class, then estimate bandwidth and storage.
-
05
Security
Map zones and conduits, choose OPC UA security modes and broker access rules, and plan certificate issue and renewal.
-
06
Outages
Define how long the gateway must buffer, how it backfills and what consumers show when data is stale.
-
07
Hardware and lifecycle
Size CPU, memory and storage for the services, check ports, temperature and power, and plan updates for the life of the site.
OPC UA vs MQTT: common questions
Quick answers
Is MQTT replacing OPC UA?
No. They solve different problems. MQTT has grown fast for moving data to enterprise and cloud systems, while OPC UA remains the main standard for describing and accessing machine data. Most new architectures use both.
Can OPC UA run over MQTT?
Yes, through OPC UA PubSub. Part 14 of the OPC UA specification defines how datasets are published through an MQTT broker in JSON or binary encoding. It keeps OPC UA semantics, but fewer consumers support it than plain MQTT or Sparkplug B.
Is OPC UA more secure than MQTT?
Not inherently. OPC UA defines its security inside the protocol, with certificates, signing and encryption. MQTT relies on TLS, client authentication and broker access rules. Both are secure when configured properly and weak when security is left off.
What is the difference between MQTT and Sparkplug B?
Sparkplug B is a specification on top of MQTT. MQTT moves messages without defining their content. Sparkplug B defines the topic structure, a typed Protocol Buffers payload and birth and death messages so systems can discover data and know when it is stale.
Is a unified namespace the same as MQTT?
No. A unified namespace is an architecture in which all systems share current state through one hub, organised along ISA-95 lines. An MQTT broker is the usual way to build it, but the namespace also needs agreed naming and data models.
Which is faster, OPC UA or MQTT?
It depends on the set-up. On a plant LAN both deliver values in milliseconds. MQTT adds a broker hop but has very small packets; OPC UA has heavier connection set-up. For deterministic timing between controllers, OPC UA PubSub over TSN is the usual route.
Do I need a gateway if my PLC supports OPC UA or MQTT?
Often, yes. A gateway still adds value by combining data from several controllers, adding context, buffering during outages, separating networks and holding certificates, so the PLC is not exposed to every consumer.
What ports do OPC UA and MQTT use?
4840 for OPC UA; 1883 or 8883 for MQTT. OPC UA binary uses TCP port 4840 by default. MQTT uses 1883 unencrypted and 8883 with TLS. Sites can change these, so confirm them in the firewall rules.
Industrial protocol FAQs
-
What Is OPC UA?
OPC UA (OPC Unified Architecture) is an open standard, IEC 62541, for exchanging data securely between industrial machines, controllers and software on any operating system. Servers publish a browsable information model that describes what each value means, and clients read, write or subscribe to it, with certificates and encryption built in.
-
What Is an IIoT Gateway?
An IIoT (Industrial Internet of Things) gateway is a rugged edge computer that connects industrial equipment, such as PLCs, sensors, meters and machines, to a network or the cloud. It collects their data, translates between industrial and IT protocols, processes and secures it at the edge, and forwards the results.
-
What Is Modbus?
Modbus is an open communication protocol that lets industrial devices such as PLCs, sensors, meters, drives and HMIs exchange data. First published by Modicon in 1979, it uses a simple request and response model: one device asks for or writes values, and another replies. It runs over serial lines as Modbus RTU and over Ethernet as Modbus TCP.
-
Modbus RTU vs Modbus TCP: What Is the Difference?
Modbus RTU and Modbus TCP carry the same Modbus messages over different links. Modbus RTU sends compact binary frames over serial lines, usually RS-485, with a CRC checksum on each frame. Modbus TCP wraps the messages in TCP/IP packets over Ethernet, normally on port 502. Gateways translate between them so serial devices can join Ethernet networks.
-
What Is the Industrial Internet of Things (IIoT)?
The industrial internet of things (IIoT) is the use of connected sensors, machines and controllers in industry, linked through gateways and networks to software that stores and analyses their data. It lets factories, utilities, transport and energy sites monitor equipment remotely, predict failures, cut energy use and improve quality without someone reading each gauge.
-
IT vs OT: What Is the Difference?
IT (information technology) manages data: servers, PCs, networks and business software. OT (operational technology) monitors and controls physical equipment: PLCs, SCADA, robots and building controls. IT puts data confidentiality first and changes fast; OT puts safety and uptime first, runs for decades and changes only in planned outages.
-
What Is SCADA?
SCADA (supervisory control and data acquisition) is a control system that gathers data from PLCs, RTUs and sensors across a plant or a wide area, shows it to operators, raises alarms, logs history and lets staff send commands back to the equipment. Water, power, oil and gas, rail and factories use it to supervise processes they cannot watch by hand.
Planning an IIoT gateway project?
Tell us which controllers and devices you need to read, the protocols they speak, where the data has to go and where the gateway will be mounted. We will recommend the gateway, I/O and network hardware, then configure, image and test it before it ships.