Hi,
I'm currently working on implement live subscriptions in an AdHoc Data Source script. I need live updates on 4 different sites: 1 DOM Instance, 2 elements and 1 service. I implemented a code using multiple watchers per site but one of the element subscriptions is the only that is working. This is the OnStartUpdate code:
And this is the _OnChange method (both ParameterWatcher variables have the same code):
Is there another way I could implement to have that multiple subscriptions? Do I must use one watcher?
Hi German,
Your code seems fine at first sight. Multiple subscriptions/watchers is supported. The source of the changes for the realtime updates in an ad-hoc data source actially doesn't matter.
How does the ParameterWatcher class look like? Maybe one instance is overwriting the subscriptions of another. To avoid this you could let each instance use it's own subscription set ID, with a random string as key.
Hi Tom,
I tried changing the IDs but still having the issue. Only one of the 3 subscription I have is working. We also tried using the same watcher for the parameter classes and doesn't work too. Do you have another suggestions for that?