Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    May 2010
    Location
    HCM
    Posts
    9

    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!

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    975
    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.

  3. #3
    Member
    Join Date
    May 2010
    Location
    HCM
    Posts
    9
    Thanks for the reply.

 

 

Similar Threads

  1. Item vs Field
    By nickponico in forum General
    Replies: 1
    Last Post: March 1st, 2010, 10:38 AM
  2. Max Frequency per Item question.
    By jkrohn in forum General
    Replies: 1
    Last Post: February 19th, 2010, 11:57 AM
  3. How to set max Frequency Per Item=4 ?
    By indrajit in forum General
    Replies: 1
    Last Post: March 10th, 2008, 06:30 PM
  4. how to add the item into eventData
    By tuongkha in forum Client APIs
    Replies: 6
    Last Post: January 10th, 2008, 10:26 AM
  5. how to add the item into eventData
    By tuongkha in forum Adapter APIs
    Replies: 9
    Last Post: January 9th, 2008, 10:51 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 06:57 PM.