OmmConsumer halts

Hi when i send in a large number of subscription requests at once my decode function

seems to halt if i use the fe.getReal().getAsDouble() to assign to a double number. If i don't use that function everything works fine. Is that function not threadsafe, or does is share a common buffer of some type?

Best Answer

  • @epfeuffer

    API can just decode data as is so it does not know when the feed will reset the value to blank or null. It's best practice to check if the fieldEntry contains Blank or null before you decode the field.

    Please apply the codes mentioned by Zoya in your codes before decoding any data.

    const FieldEntry& fe = fl.getEntry();
    if ( fe.getCode() == Data::BlankEnum )
     {
    // Print blank 
     }
    else
    {
      //... Decode Data base on fe.getLoadType() 
      //... Decode RealEnum fe.getReal().getAsDouble() etc.
    }

Answers