Results 1 to 3 of 3
  1. #1

    Question Utilizing onSubscriptionError

    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.

  2. #2
    Join Date
    Feb 2012
    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.


  3. #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
All times are GMT +1. The time now is 07:41 AM.