Inferensys

Glossary

OPC UA PubSub

An extension of the OPC Unified Architecture that decouples data producers from consumers using a publish-subscribe pattern, often over MQTT or AMQP, for scalable cloud and edge integration.
Architect reviewing LLM integration architecture on laptop, system diagrams visible, modern technical office setup.
PUBLISH-SUBSCRIBE EXTENSION

What is OPC UA PubSub?

OPC UA PubSub is an extension to the OPC Unified Architecture that decouples data producers from consumers using a publish-subscribe communication pattern, enabling scalable, one-to-many data distribution over message-oriented middleware like MQTT or AMQP.

OPC UA PubSub defines a mechanism where a publisher sends messages to a message-oriented middleware broker without knowledge of the subscribers. This contrasts with the client-server model, where each connection requires a direct, stateful session. By decoupling the sender and receiver, PubSub enables highly scalable cloud and edge integration, allowing multiple consumers to receive the same data stream simultaneously without adding load to the industrial controller.

The specification defines two primary transport protocol mappings: a broker-less form using UDP multicast for local subnets, and a broker-based form using protocols like MQTT and AMQP for wide-area network distribution. To ensure interoperability, it standardizes data encoding as either JSON or the compact, high-performance UADP binary format, and defines a strict topic namespace structure for deterministic message routing.

DECOUPLED INDUSTRIAL COMMUNICATION

Key Features of OPC UA PubSub

OPC UA PubSub extends the client-server model with a publish-subscribe pattern, enabling scalable, one-to-many data distribution over lightweight protocols like MQTT and AMQP for cloud and edge integration.

01

Publisher-Subscriber Decoupling

Unlike the classic client-server model, PubSub completely decouples data producers (Publishers) from data consumers (Subscribers). Publishers send data to a message-oriented middleware without knowing the identity or quantity of subscribers. This enables dynamic, scalable architectures where new analytics services can be added without reconfiguring PLCs or sensors. The decoupling is spatial, temporal, and synchronization-based, allowing systems to operate independently across different network topologies and lifecycles.

02

Transport Protocol Flexibility

PubSub defines a transport-agnostic data model that can be mapped to multiple protocols:

  • MQTT: Lightweight, ideal for constrained devices and cloud telemetry
  • AMQP: Advanced queuing for enterprise message brokers
  • UDP: For raw, low-latency multicast on local networks
  • OPC UA Binary: For direct, broker-less communication This flexibility allows a single semantic data model to flow from the sensor to the cloud without protocol translation gateways.
03

JSON and UADP Message Encoding

PubSub supports two primary encoding formats:

  • UADP (UA Datagram Protocol): A compact, high-performance binary format optimized for real-time industrial traffic with minimal overhead. It preserves full OPC UA type system fidelity.
  • JSON: A human-readable, web-friendly format that enables direct consumption by cloud services, Node-RED flows, and REST-based analytics pipelines without proprietary parsers. This dual encoding strategy bridges the gap between OT determinism and IT interoperability.
04

DataSetMetaData and Discovery

Every published message is described by a DataSetMetaData structure that defines the fields, their data types, and semantic meaning. This self-describing payload allows subscribers to dynamically interpret data without prior out-of-band configuration. Combined with the PubSub Configuration Model, it enables automatic discovery of available data streams, supporting plug-and-produce scenarios where new equipment announces its data capabilities to the entire network upon connection.

05

Security Model Integration

PubSub inherits OPC UA's robust end-to-end security model. Messages can be signed and encrypted at the application layer, independent of the transport protocol's security. This ensures data integrity and confidentiality even when traversing untrusted networks or public MQTT brokers. The security model supports X.509 certificates, user authentication, and fine-grained authorization, allowing a single broker to securely multiplex data from multiple tenants or production lines.

06

Real-Time and Deterministic Delivery

For time-critical applications, PubSub supports deterministic, cyclic publishing with configurable intervals down to microseconds. The WriterGroup concept organizes publishers into synchronized groups that share a common timing model. Combined with TSN (Time-Sensitive Networking) at the Ethernet layer, PubSub can guarantee bounded latency and jitter for hard real-time control loops, making it suitable for motion control and safety-critical data distribution alongside cloud telemetry on the same wire.

OPC UA PubSub

Frequently Asked Questions

Clear answers to the most common technical questions about the OPC UA PubSub extension, covering its architecture, transport protocols, and integration patterns for industrial data pipelines.

OPC UA PubSub is an extension to the OPC Unified Architecture that implements a publish-subscribe messaging pattern, decoupling data producers (Publishers) from data consumers (Subscribers). Unlike the client-server model, where consumers must poll or establish sessions with each data source, PubSub allows a Publisher to send a single message to a message-oriented middleware broker, which then distributes it to all interested Subscribers. This is configured using DataSetMetaData and PublishedDataSet objects that define the structure and timing of the data. The mechanism supports two fundamental modes: broker-less (using UDP multicast for local, high-speed communication) and broker-based (using standard protocols like MQTT and AMQP for cloud and enterprise integration). This architecture fundamentally enables scalable, one-to-many and many-to-many communication for industrial IoT.

COMMUNICATION PARADIGM COMPARISON

OPC UA Client-Server vs. OPC UA PubSub

Structural comparison of the connection-oriented request-response model and the decoupled publish-subscribe extension within the OPC UA framework.

FeatureClient-ServerPubSub

Communication Pattern

Point-to-point request-response

One-to-many/many-to-one publish-subscribe

Coupling

Tightly coupled (direct sessions)

Loosely coupled (broker-mediated)

Session Requirement

Transport Protocols

UA TCP, HTTPS

MQTT, AMQP, UDP

Network Overhead

Higher (per-connection state)

Lower (multicast/broadcast)

Scalability for Cloud Ingestion

Limited (firewall traversal issues)

Optimized (outbound cloud streams)

Typical Use Case

HMI-to-PLC supervisory control

Sensor telemetry to cloud analytics

Prasad Kumkar

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.