Failover when using EMA Java

Hello,

I am using EMA Java and now I need to implement failover, I understand that I need to use ChannelSets, but I can't find how to use them. Could someone please explain how I can add another server to use failover?

As explained in the sample code, I'm using the following line to provide the server details:

consumer  = EmaFactory.createOmmConsumer(EmaFactory.createOmmConsumerConfig().host("localhost:14002").username("user"));


is there another factory that would accept a channelset?


Thanks very much in advance.



Best Answer

  • umer.nalla
    Answer ✓

    Hi @tdlc

    Please refer to my article on EMA Config which has a section on ChannelSets

    https://developers.refinitiv.com/article/elektron-message-api-ema-configuration-overview

    You can specify the ChannelSet in the EMAConfig.xml flat file. If you are not using a config file, you can use Programmatic Config to create a ChannelSet based config within your code.

    Programmatic config is demonstrated in example example421__MarketPrice__ProgrammaticConfig. Note that the example does not include a ChannelSet - but you would replicate the structure described in the article withing your code.



Answers