Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    Oct 2009
    Location
    cbba
    Posts
    33

    problems with repeated messages

    hi,

    i'm not sure if this belongs here or the webclient subforum.

    this is the scenario,
    the web client creates a subscription on my Java adapter, the first time, the java adapter sends two data {A,B} the client work fine.
    the second time, the java adapter needs to send the same data {A,B}, but i'm not sure if the java adapter don't send the data or the web client does not receive the data.

    i need that the cliend works with the same data, this data are the same, but the information obtained with these are different.

    is there any setting to change this??

    regards

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan, Italy
    Posts
    517
    Hi Naitsir,

    I'm not sure I fully understand your issue.
    May you please clarify with an example and perhaps any pseudo-code?

    Thanks,

    Alessandro

  3. #3
    Senior Member
    Join Date
    Oct 2009
    Location
    cbba
    Posts
    33
    ok,

    well the code is the same as in helloworld with a connection to DB

    Code:
    run(){
      while(go){
        sSql = "select id,value from table where state=1";
        rs = stmt.executequery(sSql);
        while(rs.next()){
          Map<String, String> data = new HashMap<String, String>();
          data.put("Data", rs.getString("id"));
          data.put("Code", rs.getString("value"));
          listener.smartUpdate(itemHandle, data, false);
        }
        
        //this is to send garbage through data
        Map<String, String> data = new HashMap<String, String>();
        data.put("Data", "0");
        data.put("Code", "0");
        listener.smartUpdate(itemHandle, data, false);
      }
    }
    in the first cicle, the resultset have one row with this data {1,value} this is send to the web client, the web client work with this and change the state to 0.
    at some point the client web browser change the state to 1.
    then the java adapter try to send this same data again {1,value}.

    here's the problem, when i send a data and then try to send the same data (without sending anything in the middle) the following items never reach to the web client.

    when i send garbage in middle the data, everything workd fine, but this is not the most efficient solution.
    is there some configuration that allows always send the data (no matter that was previously sent the same) ?

    i hope has become clear, excuse my english

    regards.

  4. #4
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    973
    If I understand well,
    your Data Adapter sends two events with the same values and you expect that the client can be notified upon both events.
    This is how RAW and DISTINCT subscription modes work.
    You are probably subscribing to your item in MERGE mode, in which, on the other hand, only meaningful updates are forwarded.

    If your Data Adapter always sends full states (i.e. not "delta" updates), then you should consider using DISTINCT mode.
    Otherwise, you could stick to MERGE mode and set
    myTable.setRequestedMaxFrequency("unfiltered");
    but note that the latter would prevent conflation in all cases, also in case of a burst of updates.

  5. #5
    Senior Member
    Join Date
    Oct 2009
    Location
    cbba
    Posts
    33
    thanks!!! this solve my problem!!!!

    bye.

 

 

Similar Threads

  1. Logging info messages
    By mrkautocom in forum General
    Replies: 3
    Last Post: December 1st, 2010, 11:00 AM
  2. LS not sending all messages to client
    By mnenchev in forum General
    Replies: 3
    Last Post: April 20th, 2010, 09:10 AM
  3. Maximum size of updates and messages?
    By jweber in forum Client APIs
    Replies: 2
    Last Post: August 11th, 2009, 03:34 PM
  4. get custom messages in web client
    By rd2008 in forum Client APIs
    Replies: 3
    Last Post: October 30th, 2008, 10:25 AM
  5. Replies: 2
    Last Post: May 15th, 2008, 09:25 AM

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 09:25 AM.