question

Upvotes
Accepted
1 0 0 0

Blocking OmmConsumer and OmmProvider (Non-Interactive) constructors

The constructor of the OmmConsumer and OmmProvider (Non-Interactive) classes do not return before an initial RTDS connection is established or the specified timeout value expires.

a, The LoginRequestTimeOut parameter is set to zero.

In this case the constructor of the OmmConsumer / OmmProvider classes block until the initial connection was established.

b, The LoginRequestTimeOut parameter is unequal to zero

In this case constructor of the OmmConsumer and OmmProvider classes throw an exception - OmmInvalidUsageException', Text='login failed (timed out after waiting 45000 milliseconds) - if the initial connection cannot be established within the specified timeout value.

In case of RTDS connection issues, this causes a detrimental effect on the application’s responsiveness.

A possible solution could be to create the OmmConsumer / OmmProvider class in a dedicated thread. However, in case of connection issues it is not possible to gracefully stop this thread before the OmmConsumer / OmmProvider constructor returns.

Could you please advise on how to handle the blocking behavior of the EMA constructors while enabling timely processing requests from other interfaces used by the application?

#technologyema-apic++
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
78.6k 248 52 74

@Zoltan.Csonka

Thank you for reaching out to us.

I quickly checked the code and found that it could be the design of the EMA API. The applicaiton should connect and login to the server before using the OmmConsumer.

Yes, you are correct. EMA is thead-safe so it can be used in multi-threaded environments. However, other EMA interaces may be locked while the OmmConsumer is connecting to the server.

To confirm or change the internal implmentataion of EMA API, please contact the API support team directly via Contact Premium Support. However, you need to be an RDC (Refinitiv Developer Connect) named user in order to access the API support service.


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.