question

Upvotes
Accepted
3 0 0 1

EMA Channel failover

Hello,


I have a EMA Consumer based application. I am using a ChannelSet with two channels (two different IP addresses). However, when the first channel in the ChannelSet goes down (I get a 'ChannelDownReconnecting event on channel Channel_1' message, and 'Channel is down', etc), my subscriptions do not automatically failover to the next Channel in the ChannelSet. I'm wondering if this is the expected behaviour, or is the ChannelSet only useful when we make the initial connection? (i.e. detecting if one is down then rather than failover).

There is also an example on doing failover here: https://developers.refinitiv.com/en/article-catalog/article/how-implement-service-resiliency-ema-consumer-application I'm wondering if need to implement similar logic in order for the failover to work.


Thanks!

refinitiv-realtimeema-apielektron-message-apiOMMrefinitiv-realtime-sdk
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.

Upvote
Accepted
23k 22 9 14

Hello @davinb,

Failover to the next channel in ChannelSet should happen, if the initial connection did not succeed or if the established connection is broken. The article referenced discusses how to achieve service resilience, when the channel remains up, however, the service that we require from it goes down.

My thinking is, that if the failover does not seem to happen in a custom consumer, I would run a quick test with a standard example consumer that came with RTSDK, I would use Market Price 110 File Config, pointing it via Consumer configuration at your ChannelSet, I would also make sure to enable Xml tracing.

For example:

<Consumer>
<Name value="Consumer_11"/>

<!-- ChannelSet specifies an ordered list of Channels to which OmmConsumer will attempt to-->
<!-- connect, one at a time, if the previous one fails to connect-->
<ChannelSet value="Channel_12, Channel_13"/>

<Dictionary value="Dictionary_1"/>
<XmlTraceToStdout value="1"/>
</Consumer>

One option to test is to simulate the disconnect by interrupting network connectivity, observing Channel Down and after a short period of time ( 30 sec?) restoring network connectivity. EMA should try reconnecting to the original channel first, and failing that, reconnect to the second channel next, which you should see via tracing enabled. The default behavior of EMA is single-open (see more on single-open in RDM Usage Guide, so once the channel is re-established, the items should be re-subscribed.

If the channel failover and item recovery work as expected with the example consumer and test configuration, the next step could be verifying your custom consumer, to understand why the failover is not happening as expected, by comparing with the working simple example.

Hope this suggestion 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.

Upvotes
3 0 0 1

OK, so there is a difference between the Channel and a Service. If I get a message saying 'Service for this item was lost' or 'No matching service present' would the service failover described in the above mentioned example help resolve this ?


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.

Upvote
23k 22 9 14

Hello @davinb ,

Yes, they are different, let me try to explain?

Unless the connection is lost, ChannelSet -driven failover will not happen. Only on connection loss EMA will attempt reconnect to the endpoint first, and failing that, attempt the connection (failover) to the next channel that is defined on the ChannelSet.

This is because, in a general case, multiple services can be made available via connectivity endpoint/distribution infrastructure. Therefore, one service being down does not constitute the complete loss of service.

If you require, to force the reconnect to a different endpoint, based on a loss of specific service, this is the case when the article linked would describe how to implement this requirement.

Hope this explanation 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.

Upvotes
3 0 0 1

Yes, thank you for the explanation

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