We have multiple Elektron Edge servers (Primary, Secondary). I have downloaded you EMA API tutorials.
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,
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="184.108.40.206"/> <Port value="14008"/> </Channel> </ChannelList> </ChannelGroup>
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.