MonitoredItemsare used to monitor Variable Valuesfor data changes and event notifier Objectsfor new Events. Subscriptionsare used to combine data changes and events of the assigned MonitoredItemsto an optimized stream of network messages. A reliable delivery is ensured as long as the lifetime of the Subscriptionand the queues in the MonitoredItemsare long enough for a network interruption between OPC UA Clientand Server. All queues that ensure reliable delivery are normally kept in memory and a Serverrestart would delete them.

There are use cases where OPC UA Clientshave no permanent network connection to the OPC UA Serveror where reliable delivery of data changes and events is necessary even if the OPC UA Serveris restarted or the network connection is interrupted for a longer time.

To ensure this reliable delivery, the OPC UA Servershall store collected data and events in non-volatile memory until the OPC UA Clienthas confirmed reception. It is possible that there will be data lost if the Serveris not shut down gracefully or in case of power failure. But the OPC UA Servershould store the queues frequently even if the Serveris not shut down.

The Method SetSubscriptionDurabledefined in OPC 10000-5is used to set a Subscriptioninto this durable mode and to allow much longer lifetimes and queue sizes than for normal Subscriptions. The Methodshall be called before the MonitoredItemsare created in the durable Subscription. The Servershall verify that the Methodis called within the Sessioncontext of the Sessionthat owns the Subscription.

A value of 0 for the parameter lifetimeInHoursrequests the highest lifetime supported by the Server.

The revisedLifeTimeInHoursis used to set the LifeTimeCountof the Subscription.

ModifySubscriptioncan be used to change the parameters of the durable Subscription. If the Clientwould like to keep the previous life time setting, the Clientneeds to calculate the LifeTimeCountbased on the revisedLifeTimeInHoursand the PublishingInterval. ModifySubscriptiondoes not change the durable mode of the Subscription.

An OPC UA Serverproviding durable Subscriptionsshall

An OPC UA Clientusing durable Subscriptionsshall