← All Posts

OPC UA Subscriptions and Monitored Items: Subscribe to Variable Changes

You could read every OPC UA variable you care about in a loop, every second, forever. The server would oblige. Your network and CPU would not thank you, and you would still miss any change that happened between polls. OPC UA gives you a better tool: the subscription, which lets the server watch variables and push only actual changes back to you. For anything resembling live monitoring, subscriptions are how it is done.

This guide covers the two-level model — subscriptions and monitored items — the intervals that govern them, and why subscribe beats poll. For how to find the variables to subscribe to, see browsing a server.

The Two-Level Model

UA subscriptions are deliberately split into two layers:

One subscription holds many monitored items. The server samples each item at its own rate, queues notifications for the ones that change, and ships them all out together on the subscription's publishing interval.

Sampling vs Publishing

This is the part people trip over. Sampling interval is how often the server internally reads a variable to detect a change. Publishing interval is how often the subscription delivers queued notifications. They are independent.

Example: sample a fast pressure variable at 100 ms, but put it on a subscription that publishes every 500 ms. The server detects changes at 100 ms granularity, queues them, and sends up to five changes bundled in each 500 ms publish. You get fine change detection without flooding the network with publish messages.

Why split them: it decouples how finely you watch a value from how chatty the client-server link is. Many fast-sampling items can share one slow publishing subscription.

Data-Change Filters

A monitored item can carry a filter so the server only notifies on meaningful changes:

Well-chosen filters slash notification volume without losing signal — essential on slow links or with thousands of tags.

Events, Not Just Values

Monitored items are not limited to value changes. You can subscribe to events — alarms, audit entries, condition state — fired by an object or the server. Event subscriptions use the same subscription/monitored-item plumbing but deliver structured event notifications instead of data changes.

Why Subscribe Instead of Poll

Subscribing on macOS

MacTools OPC UA Explorer creates subscriptions with configurable publishing intervals, attaches monitored items with per-item sampling and filters, and renders incoming notifications live. You see changes stream in as they happen, not as you ask for them. Native macOS; no Windows, no DCOM.

Subscribe to UA Variables on macOS

MacTools OPC UA Explorer — subscriptions, monitored items, deadband filters, live notification streaming. Native macOS app.

Get MacTools OPC UA Explorer

Frequently Asked Questions

What is an OPC UA subscription?

A subscription is a server-side object that collects data-change notifications and delivers them to the client on a fixed publishing interval. Instead of the client polling variables in a loop, the server samples the monitored items and pushes only changes back to the client as notification messages. One subscription can hold many monitored items, batched into the same publishing cycle.

What is a monitored item in OPC UA?

A monitored item is a variable (or event) the client has attached to a subscription so the server watches it for changes. Each monitored item has its own sampling interval and an optional data-change filter (such as a deadband or a trigger on status change). When the sampled value changes per the filter, the server queues a notification that goes out on the next publish.

What is the difference between sampling interval and publishing interval?

The sampling interval is how often the server reads the variable internally to detect changes. The publishing interval is how often the subscription bundles queued notifications into a message to the client. You can sample a fast variable at 100 ms but publish the subscription at 500 ms; the server queues intermediate changes and sends them together. This decouples how finely you watch a value from how often you receive updates.

Why use OPC UA subscriptions instead of reads?

Subscriptions are more efficient and lower-latency. A polling client generates constant request traffic whether values change or not; a subscription pushes only actual changes, so idle variables cost nothing. Subscriptions also catch transient changes that a slow poll loop could miss between polls. For any live monitoring use case, subscriptions are the right tool; reads are for one-off snapshots.

Related: Continuous Monitoring

Voltrus SCADA runs thousands of UA monitored items in production — live dashboards, alarms, historian. From $249 lifetime.

Further Reading