Andrei
I have 2 LightstreamClient instances but on events update I see the same thread for both instances, so if one instance is slow it also slows the other instance.
How can I specify that instances use different threads?
Dario Crivelli
In fact, the invocations to the listeners are done on a single shared thread.
If there are heavy or blocking operations to be done on update events, you should dispatch and enqueue these operations to separate custom executors (and take care of preserving the order, if needed).
In your case, if you want to use different executors for updates pertaining to different instances of LightstreamerClient, you can levarage the listener identity.
In fact, the invocations to the listeners don't specify the involved LightstreamerClient instance (which is usually a single one), but you can use different instances of SubscriptionListener for subscriptions done on different instances of LightstreamerClient.