OPC UA, MQTT and industrial data integration
We read the data model a machine exposes via OPC UA and, in projects that need MQTT, distribute this data to applications through a broker. We define signal names, units, timestamps and quality information together with the consuming applications.
Certificate managementMQTT brokerTopic designTLS / ACLData model
What problem does this service solve?
A new integration for every new application
As point-to-point connections multiply, nobody can trace which data comes from where. A single change breaks several applications.
Data without names or units
Values carried with addresses like “DB10.DBW4”, without units, quality and timestamps, are misread in analytics. That is why we define a name, unit, timestamp and quality information for every signal.
Leaving the security mode at “None”
If OPC UA has security mode None and anonymous sessions enabled, or MQTT allows anonymous access, other devices on the network can reach the data too. What they can reach depends on the permissions granted by the server and the broker. We verify these settings with a checklist during commissioning.
Topic structure degrading over time
Non-standard topic names and haphazard retain/QoS settings make consuming applications work with wrong or stale data.
What we cover, and within what limits
OPC UA (IEC 62541) is a platform-independent industrial interoperability standard developed by the OPC Foundation with security built into its design. It presents data within an information model, with its types, units and relationships; it provides signing and encryption through certificate-based application identity; and in addition to the client/server model, it also defines PubSub communication. MQTT, on the other hand, is a lightweight publish/subscribe messaging protocol and OASIS standard that works through a broker; it is widely used for distributing telemetry to many consumers and for edge-to-platform connections. A project can use only OPC UA, only MQTT or both together. When used together, OPC UA usually provides access to data at the machine/cell level, and MQTT distributes the collected data to applications through the broker.
Technical scope
Data sources and consumers
A map showing which machine/PLC data goes to which application, and how often.
Naming and data model
Site–line–machine–signal hierarchy; rules for units, data types, quality and timestamps. Existing OPC UA companion specifications are used where appropriate.
OPC UA security configuration
Handled as three separate topics: application trust (application certificates and trusted certificate lists), channel security (security policy and mode: Sign / SignAndEncrypt) and user authorisation (which nodes the logged-in user can read and write).
MQTT broker and topic design
Topic hierarchy, TLS and per-user/per-topic access control lists (ACLs). QoS (delivery guarantee), retain (storing the last value), session expiry and the broker’s persistent on-disk queue are each defined separately; one does not replace another.
Disconnection and reconnection
Buffering and resending at the edge when the connection drops; filtering out duplicate messages on the consumer side. QoS 2 only covers delivery between the client and the broker; to prevent the same record being processed twice in MES or ERP, the consuming application must check it by record ID.
Monitoring and operation
Alerts for broker/server health, certificate expiry dates and flow interruptions. An expired certificate can prevent new connections from being established.
The roles of OPC UA and MQTT
OPC UA client/server
Typed and discoverable access to data on a machine or PLC; permission control for operations such as writes and method calls.
OPC UA PubSub
Combines the publish/subscribe model with the OPC UA data model; product support must be verified one by one.
MQTT broker
Scalable distribution of collected data to multiple consumers; delivery behaviour is defined with QoS and retain.
State and session management
Last Will messages and optional rules such as Sparkplug B notify consumers that a device is offline.
Prerequisites: what we need to get started
We list any gaps together in the first meeting and complete them during the survey.
- List of data sources (PLCs, machine controllers, sensors, existing OPC servers)
- The applications that will use the data and their expectations
- The environment where the broker or server will run (plant server, virtual machine, edge device)
- IT’s certificate, user and network policies
- Existing naming or asset coding standards, if any
Deliverables
Source–consumer data map
Naming and data model standard
OPC UA security and certificate configuration document
MQTT topic dictionary, QoS/retain and ACL rules
Pilot line integration and test report
Monitoring and certificate renewal procedure
Representative scenario: four different applications asking for the same data
The maintenance, quality, production planning and energy teams want different data from the same machines, and each intends to set up its own connection. Instead, machine data is read via OPC UA in a single collection layer, published to the MQTT broker using a naming standard, and each application subscribes only to the topics it is authorised for. The number of connections opened to the PLC falls. If the signal it needs is already being collected, a new consumer can be added without changing the PLC.
This is a representative architecture flow; it is not a completed customer reference.
Service summary
IIoT and Production Data Collection
We determine the signals and sampling rates needed for production, quality, energy or maintenance.
Scope limit
Developing cloud analytics platforms, data warehouses or AI models is out of scope. We design the layer that delivers data to these systems in an orderly and secure way.
How do we proceed?
No step that could affect production is carried out until the maintenance window, configuration backup and rollback plan are clear.
Mapping
A source–consumer matrix and a list of critical data are produced.
Model and naming
Hierarchy, unit and quality rules are written down.
Architecture
The roles of OPC UA and MQTT, the broker location and the security model are defined.
Pilot
A complete flow from source to consumer is built on one line and disconnection tests are carried out.
Rollout
It is extended to other lines using templates, and monitoring is put into operation.
Questions about OPC UA, MQTT and Data Integration
Should we choose OPC UA or MQTT?
On devices and systems that support it, OPC UA can present data with its type and context. MQTT delivers messages from publishers to subscribing applications. A project can use one or both. The choice depends on what the field device offers and which application will use the data.
Is OPC UA secure by default?
OPC UA offers strong security mechanisms; but if the security mode is left at “None”, certificates are not managed or anonymous access stays enabled, these mechanisms do not work. Security configuration is a separate step in the project.
Isn't data lost with MQTT?
If the QoS level, session settings and client-side buffering are designed together, the risk of loss is reduced. Where and for how long data is stored at the edge when the broker cannot be reached is planned separately.
Is using Sparkplug B mandatory?
No. Sparkplug B defines rules for topic structure and device state on top of MQTT; it is useful if the consumer side supports it. In some projects, a simple, documented topic standard is enough.
Work that can be planned together
IIoT and Production Data Collection
We determine the signals and sampling rates needed for production, quality, energy or maintenance.
Edge Gateways and Protocol Conversion
To collect data from machines that use different protocols, we review the existing interfaces, manufacturer support and open data maps.
PLC–PLC and PLC–Server Integration
We carry line status and coordination information between PLCs, and monitoring and reporting data between PLCs and servers.
Knowledge Center
Technical guides for this service
Let's plan a technical survey for OPC UA, MQTT and industrial data integration
Briefly describe the line, the PLC and network equipment you use and the problem you want to solve; we will respond with a written proposal covering scope, assumptions and deliverables.