-
September 29th, 2021, 10:50 PM
#1
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.
-
September 30th, 2021, 08:25 AM
#2
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
-
September 30th, 2021, 09:10 PM
#3
Thank you for quick reply. Will go thorough provided links and reach back for any further question.
Similar Threads
-
By leonardodar in forum Adapter SDKs
Replies: 3
Last Post: March 16th, 2011, 09:45 AM
-
By zeos in forum Adapter SDKs
Replies: 1
Last Post: January 28th, 2010, 09:41 AM
-
By mnenchev in forum Adapter SDKs
Replies: 5
Last Post: September 1st, 2009, 09:36 AM
-
By vishnugs in forum General
Replies: 4
Last Post: April 6th, 2007, 11:06 AM
-
By rmusco in forum General
Replies: 8
Last Post: February 2nd, 2007, 05:29 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 02:11 AM.
Bookmarks