Hey Dojo,
I'm working on adding Subscriptions to a driver to monitor the failover status of a DMS. I'm familiar with adding Subscription Monitoring using Core.DataMinerSystem NuGets, but they do not currently support a way to monitor the failover status. Looking at the documentation, I'm worried that there needs to be some sort of clean up if the element goes down. I know how to do this in an Ad Hoc Data Source and I'm wondering if the same logic would work there.
Thank you,
Bauti
Hi Bautista,
You're correct that subscribing to the failover status is not implemented in the Code.DataMinerSystem NuGet packages. I also think this is quite a specific use case, so it may not be ideal to include it in that library. Setting up a subscription the same way you're doing in your ad-hoc data source is therefore a valid approach.
To clean up the subscriptions when the element stops, you could have your QAction implement the IDisposable interface. In that case, DataMiner will call the Dispose() method when the element is stopped, removed, or restarted, allowing you to properly release any subscriptions.
For more information, see:
https://docs.dataminer.services/develop/devguide/Connector/LogicQActionsMemberFields.html#implementing-the-idisposable-interface