Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15
  1. #11
    I did some investigation of log, and i have no warning messages like these
    "Unexpected snapshot event for COMMAND item ..."


    Before i do more investigation, i would like know your suggestion for the case.


    - We start the LS
    - User opens the browser after a few seconds aftre, asking for Snapshot,
    new Subscription("COMMAND", "Abbruzzo", cellList);

    - We return 2 cities as the Snapshot.
    update.Add("command", "ADD");
    _listener.OnEvent(Abbruzzo, update(Aquila), true);


    update.Add("command", "ADD");
    _listener.OnEvent(Abbruzzo, update(Lanciano), true);

    _listener.OnEndSnapshot(Abbruzzo);


    - After that we get notified that a new city is built and we send:
    update.Add("command", "ADD");
    _listener.OnEvent(Abbruzzo, Filetto, true);


    - User does browser refresh
    - User have all the cities in Snapshot and right order of events.


    In case of returning the new city Lanciano like this:
    update.Add("command", "ADD");
    _listener.OnEvent(Abbruzzo, update(Lanciano), false);
    user gets wrong order of events after browser refresh.
    It seems only the first time, after browser Refresh.


    regards!
    Last edited by Slavko Parezanin; February 24th, 2014 at 03:14 PM.

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

    I confirm you that the isSnaphot flag on an update, passed from the adapter to the Lightstreamer server, should be set to true only in the early stages of a new subscription, and never for updates generated in real time.

    So in your case, set isSnapshot to true when a new city is built is something unexpected and maybe we should investigate further the case.

    Please can you repeat and isolate the case in a test environment after setting the below configurations in the lightstreamer_log_conf.xml?



    If you manage to get the data, please send them to us by mail (support@lightstreamer.com).

  3. #13
    Hi Giuseppe,
    I managed to re-produce the problem.
    I have :

    1) Adapter
    itemName = "ALL"

    2) Listener

    3) SubItems (empty at the begining, we don't know when City will appear)
    ALL/Lanciano
    ALL/Aquila

    - started the LS server and launchers
    - started the browser as faster as i can
    - clicka and ask for snapshot before any of cities has appeared
    - when i use listener.Add("ALL", GetCurrentValues(true), false);
    i get wrong order of events
    - and it can't be repaired even if i reopen the browser

    but if i use
    _trueMarketListener.Add("ALL", GetCurrentValues(true), true);

    i have no that problem !

    It can be LS bug or i haven't found the best way to ensure that ADD precedes Updates for each subitems, ... subitems do the job even all the user unsubscribed "ALL", resubscribe "ALL", and so on ...

    regards!

  4. #14
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi Slavko,

    I do not think that you have found a bug in Lightstreamer, but maybe I understand the cause of the strange behavior that you observe.

    When an Item is subscribed for the first time the adapter should send one or more update with isSnapshot flag set to true and then, optionally, the endOfSnapshot.
    But if you send the first update for an Item with isSnapshot flag set to false then you will get the wrong sequence of events because the server infers that for that Item no Snapshot exists. Please refer to the documentation of endOfSnapshot method, I assume you are using Java Adapter API but the concept is the same also in C#.

    So if, in your previous posts, you were referring to the first update sent for an Item then it is absolutely correct to have the isSnapshot flag set to true.

    Sorry for the misunderstanding.

  5. #15
    Yes that is the case.
    Thank you for the support !
    Regards !

 

 

Tags for this Thread

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:39 AM.