ManKeer
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?
Giuseppe Corti
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