question

Upvotes
Accepted
1 0 0 2

[EMA C++] How to recover the subscription of market data when the statusmsg returns a Closed stream state?

The connection to the EED server is ok. However,the OnStatusMsg method shows that the stream state for each market data item is closed and I attempt to recover the subscription of each item. The result of the attempt is that the stream state is also closed. But when I reopen my application mannually, the stream state is ok. Can you tell me how to recover the subscription of market data when the OnStatusMsg returns a Closed stream state and why a reconnection to the EED server can solve that problem?

My OnStatusMsg method is as below.

elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-apipricingstream
3640-code.jpg (91.3 KiB)
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.

Hello @zhouzhengxin,

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the 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

Hello @zhouzhengxin,

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

-AHS

1 Answer

· Write an Answer
Upvotes
Accepted
25.3k 87 12 25

Hi @zhouzhengxin

Can you confirm what value is reported for the StatusCode and StatusText? This may help understand the reason/cause of the close stream.

In terms of programmatic recovery, how soon after the Closed do you try to re-request the item? And if so, how many times do you try before abandoning?

It is usually good practice to wait a few seconds, before re-requesting and if making more than one retry attempt, wait a bit longer between each attempt - and then aborting the attempts after 2-3 attempts.

Also, just to confirm, are you actually connecting direct to the Elektron Edge Server (EED) or are you connecting via TREP i.e. ADS server?

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.

Hello @zhouzhengxin,

Please get back to us with the clarifications requested by @Umer Nalla, so we can help you?

Hello @zhouzhengxin,

How are you?

If you have found a solution, or the question has been answered outside of this forum, please share the information with us, it will be very helpful for other community members with similar questions.

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.