question

Upvotes
Accepted
1 1 3 5

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-sdkema-apirrtelektron-message-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.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 512.0 KiB each and 1.0 MiB total.

Upvotes
32.2k 40 11 19

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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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