Is there a method from and Adapter to cancel an existing subscription? We have a use case where the data point a subscription is 'monitoring' will expire. We want to force a cancellation of the subscription.
Printable View
Is there a method from and Adapter to cancel an existing subscription? We have a use case where the data point a subscription is 'monitoring' will expire. We want to force a cancellation of the subscription.
Hi rthompson,
Yes, please refer to this listener provided by the Lightstreamer server to receive requests about sessions and any asynchronous severe error notification:
https://sdk.lightstreamer.com/ls-ada...ntrolListener)
Please note that it is a feature relatively recently added and so you should make sure to use a version of the Java In-Process Adapters 7.2.0 or higher.
If, on the other hand, you use a remote library, please note that not all libraries already have this feature.
Regards,
Giuseppe
Hi rthompson,
Sorry, I missed to mention that in the specific case of terminating a subscription the callback to be invoked is in the TableInfo object paassed in the notifyNewTables.
In particular the forceUnsubscription method.
Anyway, you could also refer to this post for a general discussion on the topic: https://forums.lightstreamer.com/showthread.php?8786-Forcing-subscription-termination&highlight=forcing
Regards,
Giuseppe
We are using C#. I didn't see the forceUnsubscription method on the TableInfo object. It isn't clear how to extend the class to add that functionality.
Hi rthompson,
Yes I can confirm that the feature has not been ported to c# remote library yet.
In this case you should consider the workaround suggested in this post: https://forums.lightstreamer.com/sho...ll=1#post15065
Regards,
Giuseppe
Giuseppe,
Ok good. Thanks for all the details. Our team appreciates all your help.
Raleigh