question

Upvotes
Accepted
19 3 7 8

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-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.

1 Answer

Upvotes
Accepted
9.7k 49 38 60

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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea