-
May 29th, 2023, 01:33 PM
#1
Subscribe through JSON string
One of my clients tries to subscribe tm my adapter through a JSON string as the following:
1. if getItems method received {"name":"LStocks","pick":""}
DataProvider is LSTOCKS, since the pick is an empty string, the server should publish all market stocks to the market. [BROADCAST all market stocks]
2. if getItems method received {"name":"LStocks","pick":"item1#item2#item3"}
DataProvider is LSTOCKS, and the client should receives the updates for stocks named as: item1, item2 and item3 only [UNICAST]
my questions are:
Does this subscription format valid for Lightstreamer?
if YES, does it affect the subscription and unsubscription performance?
Does it cause any abnormal consequences or results?
-
May 29th, 2023, 04:31 PM
#2
Hi ManKeer,
In case a subscription is configured to use an Item Group the string representing the group name can have a free format.
But the getItems method must always return the full list of item names that will be subscribed to.
So even in your case 1. the getItems method has to return the full list of item names for all market stocks.
The performance is not affected by the use of group names, you should only worry about not being too slow in getItems.
Also keep in mind that using a group name your client will have to give up recognizing the items in the updates received from the explicit name, but are identified by their 1-based index within the group.
Regards,
Giuseppe
Similar Threads
-
By flybyGWT in forum Adapter SDKs
Replies: 1
Last Post: April 18th, 2014, 08:59 AM
-
By arunj in forum Adapter SDKs
Replies: 4
Last Post: February 10th, 2011, 12:32 PM
-
By latha in forum Client SDKs
Replies: 6
Last Post: December 7th, 2010, 09:26 AM
-
By latha in forum Client SDKs
Replies: 1
Last Post: January 18th, 2010, 03:27 PM
-
By naitsir in forum Client SDKs
Replies: 9
Last Post: October 19th, 2009, 04:02 PM
Tags for this Thread
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