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 ExplorerRelated: Continuous Monitoring
Voltrus SCADA runs thousands of UA monitored items in production: live dashboards, alarms, historian. Free open source core.