-
May 15th, 2018, 01:54 PM
#1
Force session to stop receive data after some time for previously subscribed item
Hello,
I am trying to find more information on documentation for how to implement the following scenario without any luck.
My client is written in JavaScript and my server in .NET, and so I use the .net adapter.
A user connects with the LS server and tries to subscribe, let say to ItemA and ItemB. The ItemA subscription is allowed by default for all users, the ItemB is allowed because this user have bought a premium service for 30 minutes.
After 30 minutes, user must continue to receive data for ItemA and stop receive data for ItemB. The web client should not hard-refresh (preferably not even change the session) and server must not send to this session data for ItemB, even if client has not made any action (client handler has crashed)
Note that many users are connected to both tables if that matters.
So, my questions are:
- How my server can stop transmit data for a table to a specific session?
- How my server can force a session to disconnect?
- What functions should I use from the .net adapter?
-
May 16th, 2018, 10:09 AM
#2
Hi cgeo,
I can confirm that you can not stop or remove a single subsciption from your adapter.
In a case like this you should force the termination of entire session.
Please refer to this post for a discussion of the solutions avaliable for this purpose: https://forums.lightstreamer.com/sho...on-termination
Furthermore, if you want to avoid that this operation affected also the data flow for ItemA, you should use two different (and non-sharing) client session.
In order that your adapter close only the client session involved in ItemB subscription but updates for ItemA will not have any repercussion.
Please let us know if you need any further clarifications.
Regards,
Giuseppe
-
May 21st, 2018, 10:44 AM
#3
Thank you for your reply.
I had already read the thread you mention, but the links are broken.
If I close the session, as you suggest, should I use the "Session Destroy Request" p:36 of https://lightstreamer.com/docs/clien...ifications.pdf ?
-
May 21st, 2018, 12:20 PM
#4
Hi cgeo,
Sorry for the broken link, please refer here: https://forums.lightstreamer.com/sho...ction/page2#13
Anyway, yes I confirm that your adapter should issue a Session Destroy Request.
Regards,
Giuseppe
-
February 11th, 2020, 01:11 PM
#5
In this post you can find a resume of what can be done to interrupt subscriptions from the server side.
Since the newly released LS Server 7.1 this is now a supported operation, but only for Java In-Process Metadata Adapters.
Similar Threads
-
By rvkvino in forum General
Replies: 9
Last Post: November 7th, 2017, 04:09 PM
-
By Johnny in forum Client SDKs
Replies: 10
Last Post: September 13th, 2010, 12:06 PM
-
By stephenallred in forum Client SDKs
Replies: 1
Last Post: June 7th, 2010, 12:13 PM
-
By mnenchev in forum General
Replies: 3
Last Post: November 25th, 2009, 03:27 PM
-
By rsouissi in forum Adapter SDKs
Replies: 4
Last Post: January 10th, 2007, 07:11 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 09:31 PM.
Bookmarks