Results 1 to 2 of 2
  1. #1
    Senior Member
    Join Date
    Dec 2019

    Lightbulb 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?

  2. #2
    Join Date
    Feb 2012
    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.




Similar Threads

  1. Replies: 1
    Last Post: April 18th, 2014, 08:59 AM
  2. How to JSON Object in Java Adapters as input
    By arunj in forum Adapter SDKs
    Replies: 4
    Last Post: February 10th, 2011, 12:32 PM
  3. Replies: 6
    Last Post: December 7th, 2010, 09:26 AM
  4. Replies: 1
    Last Post: January 18th, 2010, 03:27 PM
  5. 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
All times are GMT +1. The time now is 08:10 PM.