question

Upvotes
Accepted
1 0 0 1

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?

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
7.6k 15 6 9

@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.
}
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
23k 22 9 14

Hello @epfeuffer,

This question appears to be a duplicate of this discussion.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea