OPC UA PubSub over MQTT is a transport protocol mapping that encodes OPC UA DataSetMessages as MQTT payloads, enabling publishers to send industrial telemetry to a central MQTT broker for distribution to multiple subscribers without requiring direct client-server sessions. This decouples field-level data producers from cloud-based consumers, using MQTT's lightweight publish-subscribe pattern to minimize bandwidth and simplify firewall traversal for IIoT integrations.
Glossary
OPC UA PubSub over MQTT

What is OPC UA PubSub over MQTT?
A lightweight transport mapping that combines the OPC UA Publish-Subscribe model with the MQTT protocol to enable efficient, broker-based industrial data distribution to cloud platforms and IoT applications.
The mapping defines a standard JSON encoding for NetworkMessages and leverages MQTT topics to route DataSets based on application-defined filters. Unlike the client-server model, this approach supports one-to-many communication where a single publisher can feed multiple analytics engines, historians, or cloud services simultaneously. It is specified in OPC UA Part 14 and commonly used with brokers like Mosquitto or cloud IoT hubs to bridge operational technology with enterprise systems.
Key Features of OPC UA PubSub over MQTT
The OPC UA PubSub over MQTT transport profile combines the semantic richness of OPC UA information models with the lightweight, scalable distribution of the MQTT protocol. This architecture decouples industrial data producers from consumers, enabling efficient cloud integration and large-scale IoT deployments.
Broker-Centric Decoupling
Unlike the client-server model requiring direct sessions, PubSub over MQTT introduces a message broker that completely decouples publishers from subscribers. A publisher sends a Network Message containing a DataSet to a configured MQTT topic. Any number of subscribers can then receive that data by subscribing to the topic, without the publisher needing any knowledge of their existence. This spatial and temporal decoupling eliminates point-to-point connection complexity and allows dynamic addition of consumers without reconfiguring the data source.
JSON DataSet Message Encoding
The standard encoding for OPC UA PubSub over MQTT is JSON, making payloads human-readable and directly consumable by cloud services and web applications. Each MQTT message carries a single DataSetMessage, which contains a header with metadata like the DataSetWriterId and timestamp, followed by a payload of key-value pairs representing the published data fields. This contrasts with the binary UA Binary encoding used in client-server or TSN profiles, prioritizing interoperability with IT systems over raw bandwidth efficiency.
MQTT Topic Structure and Namespace
OPC UA PubSub defines a standardized mapping of its logical concepts to the MQTT topic namespace. The topic structure typically follows a pattern that encodes the PublisherId and optionally the DataSetWriterId, allowing subscribers to filter messages using MQTT wildcards. For example, a topic like opcua/Factory1/Cell3/PressStatus enables hierarchical topic structures that mirror the physical or logical layout of a facility. This allows MQTT brokers to efficiently route messages and enables subscribers to selectively receive only relevant data streams.
Security Mapping to MQTT Transports
Security is implemented by layering OPC UA's application-level security on top of MQTT's transport-level security. The connection between the OPC UA Publisher or Subscriber and the MQTT broker is secured using TLS, which provides encryption and broker authentication. OPC UA then adds message-level signing and encryption using its established Security Policies, ensuring end-to-end data integrity and confidentiality independent of the broker. This dual-layer approach means that even if the broker is compromised, the payload remains protected by OPC UA's proven security model.
Network Message Mapping and QoS
OPC UA PubSub maps its Network Message concept directly to an MQTT PUBLISH packet. The specification leverages MQTT's Quality of Service (QoS) levels to control delivery guarantees. QoS 0 (at most once) is suitable for high-frequency, loss-tolerant telemetry. QoS 1 (at least once) ensures delivery for critical events like alarms but may introduce duplicates. The choice of QoS allows system architects to balance the trade-off between reliability and bandwidth for different classes of industrial data within the same broker infrastructure.
Metadata Discovery via MQTT
To enable true plug-and-produce interoperability, OPC UA PubSub over MQTT includes a mechanism for publishing DataSetMetaData to a dedicated topic. This metadata describes the structure, names, and data types of the fields within a DataSet, allowing a subscriber to dynamically interpret incoming payloads without prior out-of-band configuration. A subscriber can listen on a well-known metadata topic, receive the JSON-encoded description of a DataSet, and automatically configure its parsing logic. This is critical for maintaining semantic understanding in loosely coupled, large-scale systems.
Frequently Asked Questions
Clear answers to the most common questions about combining OPC UA's semantic data modeling with MQTT's lightweight publish-subscribe transport for industrial IoT and cloud integration.
OPC UA PubSub over MQTT is a transport protocol mapping that combines the semantic data modeling of OPC UA with the lightweight publish-subscribe mechanism of MQTT to distribute industrial data to cloud and IoT applications. In this architecture, an OPC UA Publisher encodes a DataSet—a predefined collection of field-level data values—into a Network Message using either UA Binary or JSON Encoding. This message is then published to a specific MQTT topic on a central broker. Any Subscriber application, such as a cloud analytics engine or dashboard, that has subscribed to that topic receives the data without needing a direct OPC UA Session with the publisher. This decoupling eliminates the need for complex firewall configurations and persistent client-server connections, making it ideal for high-latency, bandwidth-constrained, or massive-scale telemetry scenarios common in Industry 4.0 deployments.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Understanding OPC UA PubSub over MQTT requires familiarity with the core PubSub components, the MQTT protocol specifics, and related transport mappings.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us