Reputation: 131
In general, what happens: if a client has made a subscription on a OPC-UA node and this is functioning for some amount of time. The OPC-UA server publishes data to the client in standard behaviour. Then, the OPC-UA server reboots for any reason, do the OPC-UA store its subscribers and resumes the connection and continue to publish data after its startup? Or do the client need to sense that the server went down and thus recreate the subscription? If that is the case, should one generally use polling to achieve greater stability?
Upvotes: 3
Views: 1847
Reputation: 6985
Generally, no, the server does not store subscriptions and resume them after rebooting.
The client should be notified that the server is going to reboot. But even if it's not a graceful shutdown, upon reconnecting the client should attempt to resume its session, which will fail, which means so will trying to resume or transfer its subscriptions, at which point it will know to re-create the subscriptions. (This client behavior is specified as part of a connection state machine in part 4 of the specification).
That said, OPC UA 1.03 did introduce the concept of durable subscriptions, which are supposed to be able to save state and survive restarts, but I don't know of any servers that implement this right now. I also got the sense that the intended purpose is to keep a subscription alive at very slow publishing rate for clients that may only connect e.g. every day to get updates, not to simply save state and survive a restart, which is somewhat unnecessary on its own.
Upvotes: 7