Inferensys

Glossary

Subscription

A client-managed object in an OPC UA Session that groups Monitored Items and controls the pacing and delivery of data change notifications from the Server.
Operations room with a large monitor wall for system visibility and control.
OPC UA SERVICE SET

What is a Subscription?

A Subscription is a client-managed object within an OPC UA Session that groups Monitored Items and controls the pacing and delivery of data change notifications from the Server.

A Subscription is a client-configured object in an OPC UA Session that defines a logical grouping of Monitored Items and manages the cadence at which their data change notifications are delivered. Unlike polling, where a client repeatedly requests data, a Subscription establishes a persistent, server-initiated reporting pipeline. The client specifies a publishing interval, and the Server queues all notifications generated by the Monitored Items within that window, sending them as a single Notification Message to reduce network overhead and ensure deterministic data delivery.

Subscriptions are fundamental to efficient, event-driven industrial communication, enabling a Client to track thousands of data points without flooding the network. Each Subscription operates independently, allowing different reporting rates for distinct data groups. The mechanism works in tandem with Deadband Filters and Monitoring Modes to suppress noise and control data flow, ensuring that only meaningful changes in the Address Space consume bandwidth and processing resources on both the client and server sides.

Subscription Mechanics

Key Features of an OPC UA Subscription

A Subscription is a client-managed object within an OPC UA Session that groups Monitored Items and controls the pacing and delivery of data change notifications from the Server.

01

Notification Pacing

The Subscription controls the delivery cadence of notifications through two key intervals:

  • Publishing Interval: The cycle time at which the Server checks for queued notifications and sends them to the Client. This is a Server-side timer.
  • Sampling Interval: The rate at which a Monitored Item samples its source value. This can be set independently or inherited from the Publishing Interval.
  • Queueing: If multiple changes occur between publishing cycles, the Server queues them up to a configurable Queue Size, ensuring no data loss during bursts.
02

Lifetime and Keep-Alive

Subscriptions are stateful objects that require active management to prevent resource leaks:

  • Lifetime Count: The number of consecutive Publishing Intervals that can elapse without a Client acknowledgment before the Subscription is automatically deleted by the Server.
  • Keep-Alive Count: The number of Publishing Intervals after which the Server sends an empty notification if no data changes have occurred. This allows the Client to detect a broken connection even during silent periods.
  • A Client must call the Publish service to acknowledge received notifications and reset the Lifetime counter.
03

Monitored Item Grouping

A Subscription acts as a container for one or more Monitored Items, allowing logical grouping and shared configuration:

  • All Monitored Items within a Subscription share the same Publishing Interval.
  • Each Monitored Item can have its own Sampling Interval and Filter (e.g., a Deadband Filter).
  • Grouping related data points (e.g., all sensors on a single machine) into one Subscription reduces the overhead of managing multiple independent notification streams.
04

Notification Message Structure

When a Publishing Interval elapses, the Server assembles a Notification Message containing:

  • Sequence Number: A monotonically increasing integer that allows the Client to detect missed or out-of-order messages.
  • Publish Time: The exact Server timestamp when the message was assembled.
  • Data Change Notifications: An array of value updates, each containing the current value, status code, and source timestamp for a specific Monitored Item.
  • Event Notifications: If the Subscription monitors Alarms and Conditions, event payloads are included in the same message.
05

Subscription vs. Session

A Subscription exists entirely within the scope of a single Session:

  • If a Session is closed or times out, all its Subscriptions are automatically deleted by the Server.
  • A single Session can host multiple Subscriptions, each with different Publishing Intervals for different data priority levels.
  • The Transfer Subscriptions service allows a Client to move a Subscription from one Session to another, enabling high-availability failover without losing configuration.
06

Priority and Diagnostics

Subscriptions include metadata for resource management and troubleshooting:

  • Priority: A relative byte value (0-255) assigned by the Client. When Server resources are constrained, lower-priority Subscriptions may be throttled or dropped first.
  • Max Notifications Per Publish: Limits the number of queued notifications sent in a single message to prevent overwhelming the Client.
  • Diagnostic Info: The Server can return detailed operational metrics, such as the number of late publishing cycles or discarded notifications, enabling proactive health monitoring.
OPC UA SUBSCRIPTIONS

Frequently Asked Questions

Clear answers to common questions about OPC UA Subscription mechanisms, their configuration, and their role in efficient industrial data exchange.

An OPC UA Subscription is a client-managed object within a Session that groups Monitored Items and controls the pacing and delivery of data change notifications from the Server. Instead of the Client continuously polling for value changes, the Subscription establishes a stateful, server-initiated reporting mechanism. The Client configures two key parameters: the publishing interval, which defines how frequently the Server assembles and sends a NotificationMessage, and the lifetime count, which dictates how many consecutive publishing intervals can pass without a keep-alive before the Subscription is automatically terminated. This decouples the sampling rate of individual Monitored Items from the network transmission rate, allowing a single Subscription to batch thousands of data points into a single, efficient network packet, dramatically reducing overhead compared to classic OPC polling.

OPC UA SERVICE SET COMPARISON

Subscription vs. Monitored Item

Distinguishing the container object that manages notification pacing from the individual entities that define what data to watch and when to report.

FeatureSubscriptionMonitored Item

Definition

A client-managed object that groups Monitored Items and controls the pacing and delivery of data change notifications from the Server.

A client-defined entity within a Subscription that specifies a particular Node attribute to watch and the criteria for generating a Notification Message.

OPC UA Service Set

Subscription Service Set

Monitored Item Service Set

Parent Object

Session

Subscription

Cardinality

One Session can contain multiple Subscriptions

One Subscription can contain multiple Monitored Items

Primary Function

Controls notification delivery pacing (publishing interval) and message assembly

Defines what data to monitor (NodeId + AttributeId) and the filter criteria for triggering a notification

Publishing Interval Control

Sampling Interval Control

Queue Size Configuration

Data Change Filter (Deadband)

Lifetime Management

Created and deleted by the Client; can be transferred between Sessions

Created and deleted by the Client; exists only within the scope of a parent Subscription

Notification Message Assembly

Aggregates notifications from all contained Monitored Items into a single NotificationMessage for delivery

Generates individual notifications that are collected by the parent Subscription

Keep-Alive Mechanism

Sends periodic keep-alive messages to confirm the Subscription is active even when no data changes occur

Priority Setting

Supports a priority value used by the Server to allocate resources when under load

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.