Results 1 to 3 of 3
  1. #1

    Question Deciding message delivery to a specific user - need help with a sample/example

    Hello, we have a use case where we want to send a message to a specific user depending on some logic in Data Adapter.
    For examples if we when data adapter receives data { id=10, age=20 } it needs to go to user with id=10 only. Other connected connections should not receive that message.

    Do we have a sample which shows this type of implementation. Most of the sample I saw were publishing to all connected users.

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi vinayms01,

    A typical example of Personal messages (unicast) is the "Basic Messenger Demo"; please find the full code from GitHub: https://github.com/Lightstreamer/Lig...ent-javascript
    In this case each client subscribes directly to a personalized item:

    https://github.com/Lightstreamer/Lig...ndex.html#L202

    But an alternative could be that all clients subscribe to the same Item; but through the getItems method (https://sdk.lightstreamer.com/ls-ada...a.lang.String)) of the Metadata Adapter this is transformed into a personal item simply by adding a suffix (or prefix) identifying the user.
    In your case could be the id.

    Regards,
    Giuseppe

  3. #3
    Thank you for quick reply. Will go thorough provided links and reach back for any further question.

 

 

Similar Threads

  1. Get data specific to each User by passing parameters
    By leonardodar in forum Adapter SDKs
    Replies: 3
    Last Post: March 16th, 2011, 10:45 AM
  2. User specific data example
    By zeos in forum Adapter SDKs
    Replies: 1
    Last Post: January 28th, 2010, 10:41 AM
  3. General data and User specific data
    By mnenchev in forum Adapter SDKs
    Replies: 5
    Last Post: September 1st, 2009, 10:36 AM
  4. User Specific Response
    By vishnugs in forum General
    Replies: 4
    Last Post: April 6th, 2007, 12:06 PM
  5. User-specific push
    By rmusco in forum General
    Replies: 8
    Last Post: February 2nd, 2007, 06:29 PM

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 10:55 PM.