← 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

Related: Continuous Monitoring

Voltrus SCADA runs thousands of UA monitored items in production: live dashboards, alarms, historian. Free open source core.

Further Reading