question

Upvotes
Accepted
1 0 0 3

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.



elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-api
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
Accepted
20.3k 73 10 20

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.



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
1 0 0 3

I'll try that, thank you!

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