question

Upvotes
Accepted
22 4 4 6

MRN EMA C++ API sample code with Elektron failover

We have multiple Elektron Edge servers (Primary, Secondary). I have downloaded you EMA API tutorials.

https://developers.thomsonreuters.com/elektron/elektron-sdk-cc/learning?content=8682&type=learning_material_item
https://developers.thomsonreuters.com/system/files/EMA%20Tutorials.zip

In the example it only connects to one Elektron server. It is not up to our standard to fail over from (Primary to Secondary) in case connection failed. Would you give us guidance on how we can add code to implement the failover.

Thanks and best regards,

Xiaowei

elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-apimrn
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.

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 reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.
Thanks,
-AHS

@xlil997

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 reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

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

Upvotes
Accepted
7.6k 15 6 9

@xlil997

Refering to EMA CPP Developer Guide document section 2.3 Supported Features, EMA supports Connection Failover.

You can specify a list of failover servers via the ChannelSet configuration. If a
consumer's connection attempt fails, EMA attempts to connect to the next channel in
the ChannelSet list.

You can find details about ChannelSet configuration from EMA Configurtion Guide(EMACPP_ConfigGuide.pdf) locates in < EMA Install Path >/Docs.

and below is sample configuration from the document.

<ConsumerGroup>
  <ConsumerList>
	<Consumer>
		<Name value="Consumer_1"/>
			<!-- ChannelSet is optional -->
			<ChannelSet value="Channel_1, Channel_2"/>
			<Logger value="Logger_1"/>
			<Dictionary value="Dictionary_1"/>
	</Consumer>
  </ConsumerList>
</ConsumerGroup>
<ChannelGroup>
  <ChannelList>
	<Channel>
		<Name value="Channel_1"/>
		<ChannelType value="ChannelType::RSSL_SOCKET"/>
		<Host value="localhost"/>
		<Port value="14002"/>
	</Channel>
	<Channel>
		<Name value="Channel_2"/>
		<ChannelType value="ChannelType::RSSL_SOCKET"/>
		<Host value="122.1.1.100"/>
		<Port value="14008"/>
	</Channel>
  </ChannelList>
</ChannelGroup>	

channelset.jpg (53.7 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.

Upvotes
25.3k 87 12 25

Hi @xlil997

The tutorials are designed to help a new developer familiarise themselves with the basics of EMA and therefore intentionally simple and should not be used as the basis for any Production application.

My colleague has responded above regarding ChannelSets - you may also wish to refer to my EMA configuration overview article here which includes some notes on ChannelSets.

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.