question

Upvotes
Accepted
1 0 0 0

RTSDK EMA C++ -not able to set serviceName and see it right away

For my unit tests I need to set name and serviceName to my message. I need to create a message and then pass it to my OmmConsumerClient class. But it did not work.


After multiple attempts to make my code work, I finally realised that the issue is in particular logic of setting serviceName. When setting serviceName message, using the function with corresponding name, hasServiceName function always returns false.


I have checked the official unit tests and it appears that they specifically check that serviceName is not set even after it was set few lines above.


For example, official unit-tests of RefreshMsg - Real-Time-SDK/Cpp-C/Ema/Examples/Test/UnitTest/RefreshMsgTests.cpp at master · Refinitiv/Real-Time-SDK · GitHub :


//serviceName is only kept on the encoded RsslMsg
refresh.serviceName( serviceName );
// Other code...
EXPECT_FALSE( refresh.hasServiceName() ) << "RefreshMsg::hasServiceName() == false" ;

I have digged deeper into the code of internal encoders and decoders. There is a serviceId field which actually can be set.


Could somebody help me with writing a unit-test ? Comment above in the code states that serviceName is only kept on the encoded RsslMsg. How can I achieve a proper RefreshMsg object with name and serviceName set ?


Also, I am curious why such behavior was chosen ?

#productema-apic++ommconsumerdecoder
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.

1 Answer

· Write an Answer
Upvotes
Accepted
84.6k 287 53 77

@Ruslan Arkhyryeyev

Thank you for reaching out to us.

It could be the limitation in the EMA.

If you are an Refinitiv Developer Connect (RDC) named user, please contact the API support team directly via Contact Premium Support to verify this behavior.

Otherwise, you can sumit this issue on GitHub.


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.