OPC UA vs MQTT vs Modbus: Factory Guide 2026

OPC UA vs MQTT vs Modbus: Which Industrial Protocol Should Your Factory Use in 2026?

OPC UA vs MQTT vs Modbus is not simply a choice between three competing industrial protocols. Each technology solves a different part of the factory-connectivity problem.

Modbus is commonly used to read registers from PLCs, drives, meters and industrial devices. OPC UA provides structured industrial information with security and interoperability features. MQTT efficiently distributes events and telemetry from edge systems to dashboards, applications and cloud platforms.

Direct answer: Use Modbus for simple communication with supported industrial devices. Use OPC UA when applications need structured machine information, discovery and secure client-server integration. Use MQTT when data must be distributed efficiently from gateways to multiple applications. Many practical factories use all three at different layers.

This guide explains how the protocols differ, where each one fits and how to select an architecture for PLC data acquisition, Industrial IoT, ERP integration and mobile factory applications.

OPC UA vs MQTT vs Modbus: Quick Comparison

Area Modbus OPC UA MQTT
Primary role Read or write device registers and coils Exchange structured industrial information Publish and distribute messages through a broker
Communication pattern Client-server request and response Client-server and PubSub options Publish and subscribe
Typical location Device and PLC connectivity Machine, line, SCADA, MES and edge integration Edge-to-platform, application and cloud messaging
Data meaning Numeric registers require external mapping Supports structured information models Payload meaning must be defined by the application
Traditional security Traditional Modbus does not provide built-in authentication or encryption Supports certificates, authentication, signing and encryption Security depends on broker configuration, authentication and protected transport such as TLS
Hardware support Very common in PLCs, drives, meters and instruments Common in modern PLCs, machines, SCADA and industrial software Common in gateways, embedded devices and IIoT platforms
Best fit Simple, predictable device access Interoperability and contextual industrial data Scalable distribution of telemetry and events

The correct protocol should be chosen for each communication layer. Trying to force one protocol across the complete architecture may create unnecessary complexity or security risks.

What Is Modbus?

Modbus is an application-layer messaging protocol widely used for communication with industrial automation equipment.

The official Modbus Application Protocol specification defines a client-server request-and-response model using function codes. Modbus can operate over serial communication or TCP/IP networks.

Common forms include:

  • Modbus RTU: Commonly used over RS-485 serial networks.
  • Modbus TCP: Carries Modbus communication over Ethernet and TCP/IP.
  • Modbus ASCII: A serial representation that is less common in modern installations.
  • Modbus Security: A separate specification combining Modbus with TLS and certificate-based protection.

How Modbus data is organised

A Modbus device normally exposes information through addresses representing coils, discrete inputs, input registers and holding registers.

For example, a power meter might expose:

  • Voltage in one register
  • Current in another register
  • Power factor across one or more registers
  • Total energy in another address

The protocol does not automatically explain the business meaning, unit, scale or data type of every register. The integrator needs the device’s register map and must implement the correct conversion.

When Modbus is a good choice

  • Reading an energy meter
  • Collecting values from a PLC
  • Connecting a variable-frequency drive
  • Reading temperature, pressure or flow instruments
  • Integrating older equipment through a gateway
  • Building a simple machine-monitoring pilot

Limitations of traditional Modbus

  • Register addresses have little meaning without documentation.
  • Different vendors may represent data differently.
  • Traditional Modbus does not provide authentication or encryption.
  • Polling many devices can increase network and gateway load.
  • Device replacement may require register remapping.
  • It is not designed as a complete cloud or enterprise messaging architecture.

Modbus remains useful because it is simple and widely supported. Its limitations should be handled through gateways, documentation, network controls and a suitable data-processing layer.

What Is OPC UA?

OPC Unified Architecture, or OPC UA, is an industrial interoperability framework developed by the OPC Foundation.

Unlike a basic register protocol, OPC UA can represent data as structured objects with relationships, properties, methods, alarms and events.

The OPC Foundation describes OPC UA as a platform-independent architecture supporting information modelling, discovery, data access and security.

Why the OPC UA information model matters

Suppose a machine exposes a value of 72. Modbus may tell the application that register 40021 contains 72. The application still needs a register map to determine what that value means.

An OPC UA server can expose the information with context such as:

  • Machine: CNC-07
  • Parameter: Spindle load
  • Value: 72
  • Unit: Percent
  • Timestamp: Time of measurement
  • Quality: Good, uncertain or bad

This context makes integration easier for SCADA, MES, historians, Industrial IoT platforms and enterprise applications.

OPC UA communication models

OPC UA supports more than one communication approach:

  • Client-server: A client browses, reads, writes or subscribes to information exposed by a server.
  • Publish-subscribe: Publishers distribute information that can be consumed by interested subscribers.

The right model depends on the equipment, supported OPC UA profiles and the project architecture.

OPC UA security capabilities

The OPC UA security specification covers application authentication, user authentication, message integrity and confidentiality.

OPC UA can support:

  • Application certificates
  • Client and server authentication
  • User authentication
  • Message signing
  • Message encryption
  • Role-based permissions
  • Audit information

These capabilities do not make every OPC UA deployment automatically secure. Certificates, trust lists, users, permissions and security policies must be configured and maintained correctly.

When OPC UA is a good choice

  • Connecting modern machines from multiple vendors
  • Exchanging structured data between PLC, SCADA and MES
  • Building a standard information model across production lines
  • Collecting alarms, events and machine states
  • Providing contextual data to an industrial edge platform
  • Supporting secure integration between OT applications

OPC UA limitations

  • Initial certificate and trust configuration can be complex.
  • Not every PLC or machine supports the same OPC UA features.
  • Older equipment may require an external OPC UA gateway.
  • Poor information modelling can still create inconsistent data.
  • Licensing or runtime capabilities may differ by hardware vendor.
  • OPC UA should not automatically be treated as a replacement for safety or deterministic control networks.

What Is MQTT?

MQTT is a lightweight client-server publish-and-subscribe messaging transport protocol.

According to the OASIS MQTT 5.0 specification, MQTT is designed for efficient messaging, including constrained devices and networks where bandwidth may be limited.

How MQTT works

MQTT contains three primary roles:

  • Publisher: Sends a message to a topic.
  • Broker: Receives messages and distributes them to authorised subscribers.
  • Subscriber: Receives messages matching its subscribed topics.

A factory gateway might publish a machine event to a topic structured like:

factory/chennai/line-2/cnc-07/status

Approved subscribers could include:

  • A production dashboard
  • A data historian
  • An alerting service
  • A mobile application backend
  • An ERP integration service

The machine gateway does not need a direct connection to every consuming application. The broker manages message distribution.

MQTT Quality of Service levels

MQTT provides three Quality of Service levels:

  • QoS 0 – at most once: The message is sent without delivery acknowledgement.
  • QoS 1 – at least once: Delivery is acknowledged, but duplicate messages are possible.
  • QoS 2 – exactly once: A multi-step exchange is used to complete delivery exactly once between the MQTT sender and receiver.

QoS does not remove the need for application-level validation. An ERP integration should still use event identifiers, timestamps and duplicate protection before creating a production or maintenance transaction.

When MQTT is a good choice

  • Sending telemetry from multiple gateways
  • Connecting factories with a central platform
  • Distributing machine events to several applications
  • Supporting intermittent network connectivity
  • Building cloud-connected Industrial IoT platforms
  • Delivering status and alerts to application backends

MQTT limitations

  • The protocol does not define the meaning of the message payload.
  • Topic design requires planning and governance.
  • Broker access control must be configured correctly.
  • QoS 1 can produce duplicates that applications must handle.
  • Retained messages can expose stale information if used incorrectly.
  • MQTT should not replace a safety system or time-critical machine-control network.

Are OPC UA, MQTT and Modbus Direct Competitors?

No. They frequently operate at different layers.

A common brownfield factory architecture is:

Industrial device → Modbus → Edge gateway → OPC UA information model or data normalisation → MQTT → IIoT platform → ERP and mobile apps

Not every implementation requires every step. Examples include:

  • A modern machine may expose OPC UA directly.
  • A simple energy meter may provide only Modbus RTU.
  • A gateway may read Modbus and publish normalised MQTT messages.
  • An on-premise MES may consume OPC UA without MQTT.
  • A multi-factory cloud platform may use MQTT between each site and the central application.

The architecture should match the equipment and business requirement, not a predetermined protocol preference.

Protocol Selection by Factory Requirement

Requirement Likely option Reason
Read registers from an energy meter Modbus RTU or TCP Simple and commonly supported by industrial meters
Read structured data from a modern CNC machine OPC UA, if supported Machine data can include names, hierarchy, types and status
Send data from 20 factories to one platform MQTT through secure gateways Broker-based distribution decouples sites from applications
Connect PLC data to SCADA OPC UA or a supported industrial driver Depends on PLC capability, SCADA support and control requirements
Collect data from a legacy PLC Modbus or vendor-specific protocol through a gateway Older controllers may not provide modern interfaces
Standardise data across machine brands OPC UA information model or edge canonical model Normalisation provides common names and structure
Send machine alerts to multiple applications MQTT Multiple authorised subscribers can receive an event
Create ERP maintenance tickets Gateway or middleware plus ERP API Raw industrial messages must be validated and converted into business events

Modbus vs OPC UA

The central difference between Modbus and OPC UA is the amount of structure and context they provide.

Modbus is effective when the application knows exactly which register to read and how to interpret it. OPC UA is more suitable when different applications need to discover and understand structured machine information.

Decision Choose Modbus when Choose OPC UA when
Device capability The device exposes a documented Modbus map The device includes an OPC UA server
Data complexity A small number of values must be read Machines expose many related parameters and events
Interoperability The integration is device-specific Several applications need a common model
Security The connection remains inside a protected segment or uses additional protection Application authentication, signing and encryption are required and supported
Engineering effort A reliable register map is available Browsing and structured discovery reduce manual mapping

OPC UA may offer a stronger long-term integration model, but it cannot create capabilities that the machine or controller does not support.

OPC UA vs MQTT

OPC UA and MQTT overlap in some publish-subscribe scenarios, but they are not equivalent.

OPC UA provides an industrial information model and a collection of services. MQTT transports application-defined messages between clients through a broker.

Decision OPC UA MQTT
Main strength Industrial context and interoperability Efficient message distribution
Data model Built into the OPC UA architecture Defined by the implementing applications
Typical connection Application-to-machine or application-to-industrial server Gateway and applications connected through a broker
Security OPC UA security policies, certificates and user controls Broker authentication, topic permissions and protected transport
Cloud distribution Possible but depends on architecture and supported profiles Frequently used for edge-to-platform messaging

A practical architecture may use OPC UA inside the factory and MQTT for transferring selected information to an enterprise or cloud platform.

Modbus vs MQTT

Modbus communicates with industrial devices. MQTT distributes application messages.

An edge gateway may act as the bridge:

  1. The gateway polls a motor drive using Modbus TCP.
  2. It converts registers into values such as speed, current and fault state.
  3. It adds the machine identifier, timestamp, unit and quality.
  4. It publishes a normalised message to an MQTT topic.
  5. Dashboards and integration services consume the message.

Replacing Modbus with MQTT is only possible when the device itself supports MQTT or an additional gateway is installed. MQTT cannot directly read a Modbus register without a component translating between the protocols.

How These Protocols Connect with Odoo ERP

Odoo should not normally communicate directly with every PLC, meter or CNC controller.

A safer architecture is:

Machine protocol → Industrial gateway → Normalisation and rules → Secure integration API → Odoo ERP

The gateway or integration layer can convert industrial data into business events such as:

  • Production quantity completed
  • Machine downtime started
  • Critical alarm detected
  • Quality measurement recorded
  • Energy limit exceeded
  • Maintenance threshold reached

Odoo can then update Manufacturing, Maintenance, Quality, Inventory or other approved workflows.

Tech4Lyf combines Odoo development with smart-factory integration for projects that require both industrial connectivity and ERP workflows.

How Protocol Data Reaches a Mobile App

A mobile app should generally consume approved information from an application API, not connect directly to a PLC or MQTT broker on the factory network.

A recommended flow is:

PLC or machine → Gateway → IIoT platform → Application API → Mobile app

The mobile application may display:

  • Machine running and stopped status
  • Current production against target
  • Downtime alerts
  • Maintenance requests
  • Energy-consumption summaries
  • Quality exceptions

This approach allows the business to apply user authentication, permissions, audit logs and data filtering before sending information to the device.

Explore Tech4Lyf’s mobile app development services for factory dashboards and ERP-connected applications.

Performance and Reliability Considerations

Protocol selection should not be based on claims that one technology is always faster than another. Actual performance depends on:

  • PLC or device processing capability
  • Number of requested values
  • Polling or publishing frequency
  • Network bandwidth and latency
  • Gateway hardware
  • Message size
  • MQTT QoS level
  • Broker and subscriber performance
  • OPC UA subscription settings
  • Database and application processing

Collect data at the frequency required for the business use case. An OEE dashboard may not need millisecond values, while a control loop may require a dedicated deterministic industrial network rather than an ERP or cloud integration.

Security Comparison

Security area Modbus OPC UA MQTT
Authentication Not included in traditional Modbus Supports application and user authentication Implemented through broker and client configuration
Encryption Not included in traditional Modbus; separate Modbus Security specification is available Supports message encryption Can use TLS depending on deployment
Authorisation Usually handled by network and gateway controls Can support roles and permissions Broker access-control rules can restrict topics
Certificate management Required when using Modbus Security Important for trusted OPC UA applications May be used for broker and client authentication
Public internet exposure Not recommended Not recommended without a carefully secured architecture Use a secured broker, authentication, TLS and restrictive access controls

The NIST Guide to Operational Technology Security recommends protecting OT while considering its safety, reliability and performance requirements.

Minimum industrial security controls

  • Do not expose PLCs or industrial protocol ports directly to the public internet.
  • Segment production, gateway, business and public-facing networks.
  • Use firewall rules allowing only required sources, destinations and ports.
  • Start with read-only data acquisition unless writing is specifically required.
  • Use unique credentials and remove vendor defaults.
  • Enable secure OPC UA policies instead of anonymous or unprotected access.
  • Use TLS and broker authentication for MQTT.
  • Restrict publishers and subscribers to approved topics.
  • Manage certificates, expiration and revocation.
  • Record connection failures and configuration changes.
  • Back up gateway mappings, certificates and integration configuration.
  • Test changes in a controlled environment before production deployment.

How to Choose the Correct Industrial Protocol

Step 1: Audit the existing equipment

Record every PLC, CNC controller, drive, meter and device. Identify available Ethernet, serial and vendor-specific interfaces.

Step 2: Confirm supported protocols

Review official device manuals, firmware versions, runtime licences and controller configuration. Do not assume that a protocol shown in a product family brochure is enabled on the installed machine.

Step 3: Define the business use case

Identify whether the objective is OEE, energy monitoring, predictive maintenance, production counting, quality traceability or ERP integration.

Step 4: Define required data frequency

Collecting one production count per cycle requires a different architecture from collecting high-frequency vibration data.

Step 5: Build a data dictionary

For every required point, document:

  • Machine and parameter name
  • Register or node identifier
  • Data type
  • Unit and scaling
  • Valid range
  • Update frequency
  • Quality information
  • Business meaning

Step 6: Design the security zones

Define which systems remain in the machine network, which data reaches the edge gateway and which approved information can reach enterprise or cloud applications.

Step 7: Run a pilot

Begin with one machine or line. Test normal operation, network loss, device restart, invalid values, certificate expiry and application downtime.

Step 8: Standardise before scaling

Establish naming rules, MQTT topic structure, OPC UA modelling conventions, units, timestamps and gateway configuration templates before connecting additional machines.

Common Protocol Selection Mistakes

  • Treating all protocols as substitutes: They frequently belong at different layers.
  • Choosing based only on familiarity: The equipment and business requirement should guide the decision.
  • Ignoring register quality: A Modbus connection is useless if the register map is incomplete or scaling is wrong.
  • Using MQTT without payload governance: Topic and message structures become inconsistent without standards.
  • Disabling OPC UA security for convenience: Temporary insecure settings often remain in production.
  • Sending every raw tag to ERP: ERP should receive business events and summaries, not unnecessary high-frequency signals.
  • Connecting mobile apps directly to OT: Use an authenticated application layer.
  • Skipping failure testing: Gateways and integrations must recover after network, power and application outages.

Frequently Asked Questions

Which is better: OPC UA, MQTT or Modbus?

None is universally better. Modbus is useful for straightforward device access, OPC UA provides structured industrial information and MQTT efficiently distributes messages through a broker.

Can MQTT replace Modbus?

Only when the industrial device directly supports MQTT or a gateway translates its device protocol into MQTT. MQTT cannot automatically read Modbus registers without a bridge.

Can OPC UA replace Modbus?

OPC UA may replace Modbus for applications supported by modern devices, but many meters, drives and legacy PLCs provide only Modbus. A gateway can expose Modbus data through OPC UA.

Is Modbus secure?

Traditional Modbus does not provide authentication or encryption. The Modbus Organization publishes a separate Modbus Security protocol using TLS and certificates. Legacy Modbus should be protected through segmentation, restrictive firewall rules and secure gateways.

Is MQTT secure?

MQTT can be deployed securely when the broker uses strong authentication, TLS, certificate or credential management and restrictive topic permissions. An MQTT deployment is not automatically secure simply because a broker is used.

Does OPC UA support encryption?

Yes. OPC UA includes security mechanisms for authentication, message signing and encryption. These controls must be correctly enabled and maintained.

Which protocol is best for cloud connectivity?

MQTT is frequently suitable for distributing selected edge data to central platforms. The correct architecture still depends on security, data volume, connectivity and cloud-platform requirements.

Which protocol is best for PLC data acquisition?

Use a protocol supported and licensed on the installed PLC. Modbus is common for simple access, OPC UA can provide richer structured information, and vendor-specific protocols may be necessary for some controllers.

Can Odoo connect to Modbus, MQTT or OPC UA?

Yes, through a suitable gateway, middleware or custom integration service. Odoo should generally receive validated business events rather than communicating directly with every industrial device.

Do factories need all three protocols?

Not always. A small monitoring project may use only Modbus and a gateway. A multi-site IIoT platform may use Modbus or OPC UA inside each factory and MQTT for central message distribution.

Build a Reliable Machine-Connectivity Architecture

The best result in an OPC UA vs MQTT vs Modbus evaluation is rarely a single winner. The objective is to assign each protocol to the layer where it provides the most value.

Tech4Lyf helps manufacturers audit machine interfaces, connect PLC and CNC data, configure industrial gateways, build IIoT dashboards and integrate selected events with ERP and mobile applications.

Read more about PLC data acquisition, industrial IoT gateways and connected manufacturing platforms.

Not sure which protocol your machines support? Contact Tech4Lyf for a machine-connectivity and Industrial IoT assessment.

Authoritative Technical Resources

Trusted By Industry Leaders

Zealeye Logo
Zealeye Logo
Zealeye Logo
Zealeye Logo
Zealeye Logo
Zealeye Logo
Zealeye Logo
Zealeye Logo
Annai Printers Logo
Deejos Logo
DICS Logo
ICICI Bank Logo
IORTA Logo
Panuval Logo
Paradigm Logo
Quicup Logo
SPCET Logo
SRM Logo
Thejo Logo
Trilok Logo
Wingo Logo
Zealeye Logo
Scroll