rajesh.palanisamy
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 :Smile_Ah: HTML]|ERROR|LightstreamerLogger.subscriptions|SERVER POOLED THREAD 8 |Subscription error for item invalidKey[/HTML]
JavaAdapter :Smile_Ah: INDENT=2]
Inside subscribe method im throwing SubscriptionException
Client Listener :Smile_Ah: HTML]mySubscription.addListener({ onSubscriptionError :Smile_Ac: code, message)=>{
console.log('onSubscriptionError');
});[/HTML]
I am angular JS as client interface and java adapter.
Giuseppe Corti
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
rajesh.palanisamy
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
Giuseppe Corti
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
rajesh.palanisamy
Thanks Giuseppe.