-
July 24th, 2023, 02:32 PM
#1
Utilizing onSubscriptionError
Hello,
I am setting up a Lightstreamer Java SE Client to connect to a third-party server utilizing the Lightstreamer Adapters. I am running into an issue however as I cannot get onSubscriptionError to be called in my listener to simulate an error, even when subscribing to non-existent items.
I thought maybe it was just that the third-party was just ignoring the request instead of giving back an error, however, I ran a simulator and coded in throwing a SubscriptionException from the SmartDataProvider subscribe() implementation and even this did not trigger onSubscriptionError() to be called.
How would I be able to set this up in my simulator to test error scenarios?
Thank you kindly.
-
July 24th, 2023, 03:56 PM
#2
Hi zumb001,
The SubscriptionException thorown in the Data Adapter is not notified to the clients; it just causes the clients not to receive data.
This is because we expect that all checks on the validity of the subscription, in terms of authorizations, permissions, and formal verifications on item and field names, are performed in the Metadata Adapter. Once all the checks in the Metadata Adapter have passed, there is no reason for the Data Adapter to reject a subscribe request, except for communication issues with the back end, which must be handled internally.
If you want to receive an onSubscribeError, you must throw, for example, a CreditsException from the notifyNewTables method.
Regards,
Giuseppe
-
July 24th, 2023, 04:23 PM
#3
Ah, I see, that makes sense. Thank you!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 11:52 AM.
Bookmarks