I confirm that the
onSubscription() event doesn't have the meaning you expected.
I appreciate that what reported in the documentation
called by Lightstreamer to notify that a Subscription has been successfully subscribed to through the Server
may be misleading.
Actually, the outcome of the subscription as performed by the Data Adapter (including any
SubscriptionException raised) is not forwarded to the client;
so, the
onSubscription()event is triggered when the Server has received the subscription request, before it invokes (if needed)
subscribe() on the Data Adapter.
The goal of
onSubscription is mainly that of notifying the listener when a resubscription of the item has been made under the hood, due to a reconnection for recovery purpose, because at that point the update flow may have a discontinuity.
On the other hand, the updates (including the snapshot) are guaranteed to be delivered only after
subscribe() has terminated.
So, you could leverage that property in some way.