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:
- Subscription — a server-side object with a publishing interval. It bundles notifications and sends them to the client on that cycle.
- Monitored item — a variable (or event) attached to a subscription. Each has its own sampling interval and an optional filter.
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.
Data-Change Filters
A monitored item can carry a filter so the server only notifies on meaningful changes:
- Deadband — only notify when an analog value changes by more than a percentage or absolute amount. Suppresses sensor noise.
- Trigger — notify on value change, status change, or both. A value that stays the same but flips to Bad quality can still alert you.
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
- Efficiency. Idle variables generate zero traffic. A 1000-tag subscription with nothing changing costs almost nothing.
- Latency. A change is reported as soon as the next publish after it is sampled — no waiting for the next poll tick.
- Completeness. Intermediate changes are queued and delivered, not lost between polls.
- Server-friendly. The server manages sampling schedules; you are not hammering it with read requests.
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 ExplorerFrequently 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.