I know this thread is a bit old, but still very relevant to my use case as described below.

We wanted to ensure that upon the user hitting logout, all streaming sessions to LS be terminated. The obvious solution is to modify the above code, group the sessions for a given user together, and then raise a disconnect call on one of the open 'LightstreamerClient' object. However, architecture tells me that logout event is loosely coupled with the many, many applications in the portal and it only servers to call an HTTP request to invalidate the session cookie.

I expected that i would be able to extract LS sessions from the HTTP header and call LS server for session termination, but LS documentation tells me that is not possible ( please correct if i am wrong). Putting a cached map of user to session_id's somewhere in the global cache has system engineering in a fit so will be a hard sell.

So, please advice if there is another solution to extract LS session information from the headers, or another way to disconnect user sessions which is not based on LS session_id's. Thanks a lot for any advice you can give.