Results 1 to 5 of 5
  1. #1

    SubscriptionException

    I am throwing an SubscriptionException and its logged as below, but will it reach the client. I wanted to notify the client if the itemName used for subscription is invalid

    ServerLog:
    HTML Code:
    |ERROR|LightstreamerLogger.subscriptions|SERVER POOLED THREAD 8     |Subscription error for item invalidKey
    JavaAdapter:
    Inside subscribe method im throwing SubscriptionException


    Client Listener:
    HTML Code:
    mySubscription.addListener({    onSubscriptionError:(code, message)=>{
            console.log('onSubscriptionError');
        });
    I am angular JS as client interface and java adapter.

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi Rajesh,

    A failed subscription due to SubscriptionException is not notified to the clients; it just causes the clients not to receive data.
    Indeed, in the intentions of interfaces design, is the Metadata responsible for refusing a subscription and informing the clients of the reason.
    For example refer to:

    CreditsException (notifyNewTables) - if the User is not allowed to add the specified Tables
    ItemsException (getItems) - if the supplied Item Group name (or Item List specification) is not recognized

    If the problem occurs in the Subscribe of the Data Adapter we assume that it is an unexpected technical problem and the clients should not directly involved.

    Regards,
    Giuseppe

  3. #3
    Thanks Giuseppe,


    Data Adapter faces unexpected technical problem I am suppose to alert the client to take up recovery action for data retrieval.

    Can you suggest me the best practice which i can implement.

    Thanks
    Rajesh

  4. #4
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi Rajesh,

    Basically any technical issue faced by the Data Adapter should be addressed at the application level.
    This means that usually we suggests to add a specific Item (or specific fields to existing Items) to inform the client about any kind of problem that could compromise the actual real-time of incoming data.

    Regards,
    Giuseppe

  5. #5
    Thanks Giuseppe.

 

 

Tags for this Thread

Bookmarks

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 11:15 AM.