question

Upvotes
Accepted
19 7 10 9

Is OnStatusMsg is sufficient for handling Connection State, State of Item and other states related to data retrieval using EMA?

Dears @nick.zincone.1, @Umer Nalla, @Olivier DAVANT

Is OnStatusMsg is sufficient for handling Connection State, State of Item and other states related to data retrieval using EMA? Or is there any other API we need to take care while handling certain events related to Connection, Item States.

Thanks and Regards,

Gaurav Mahajan

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.

@gaurav.mahajan

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
17.2k 82 39 63

Hi @gaurav.mahajan,

The OnStatusMsg is typically associated with asynchronous attribute changes related to an already opened event stream. In addition, status messages are also delivered if Elektron informs you that a request to login or to retrieve data fails. Reasons such as invalid user credentials when you log in or you have requested an invalid market data item.

Actual connection-related events are not delivered through the OnStatusMsg handler. EMA has built-in connection management - retries, recovery etc. For example, if you are watching 2 items and your connection goes down, you won't get an explicit event within the OnStatasMsg saying your channel went down, but rather, 2 status events indicating that your 2 opened event streams are in a state of "Suspect" and the reason being that the channel is down. The items remain open so EMA can recover upon re connection.

If you look at a simple running example, you will see that EMA does report connection events within the logger.

Hope this helps.

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.