-
December 23rd, 2010, 09:18 AM
#1
How the only one client recieve item when two clients subscribe the same item?
Hi all,
I'm using DotNet to develope LightStreamer Server which is based on Portfolio Demo and Metadata Adapter, I have a problem:
When two clients or more subscribe the same item, I want to the only one client recieved that item.
Please give me the way to resolve that problem.
Thanks!
-
December 23rd, 2010, 03:16 PM
#2
You can keep track of the items currently being subscribed to through the NotifyNewTables and NotifyTablesClose callbacks invoked on your Metadata Adapter (a remote .NET Adapter, I suppose).
You just have to enable the notifications first, by returning true from WantsTablesNotifications.
With this information, you can then refuse a further subscription request based on the items involved by returning a CreditsException from the related invocation of NotifyNewTables.
Note that in case you are running multiple Server instances, the various instances of the Metadata Adapter have to share, in some way, the information on the item usage.
Also note that, when a client closes, its subscriptions may be kept alive for a few seconds by the Server and this may disturb a client starting in that timeframe (or just the same client, in case it was just refreshing).
If acting on request refusal were not a suitable implementation of your requirement, more sophisticated approaches could be discussed.
-
December 24th, 2010, 08:51 AM
#3
Similar Threads
-
By nickponico in forum General
Replies: 1
Last Post: March 1st, 2010, 10:38 AM
-
By jkrohn in forum General
Replies: 1
Last Post: February 19th, 2010, 11:57 AM
-
By indrajit in forum General
Replies: 1
Last Post: March 10th, 2008, 06:30 PM
-
By tuongkha in forum Client SDKs
Replies: 6
Last Post: January 10th, 2008, 10:26 AM
-
By tuongkha in forum Adapter SDKs
Replies: 9
Last Post: January 9th, 2008, 10:51 AM
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 10:22 PM.
Bookmarks