Use multiple hosts with EMA Java

Parik
Parik Newcomer
edited June 5 in EMA

Hello,

We are able to successfully connect and retrieve data using EMA java library,

EmaFactory.createOmmConsumer(EmaFactory.createOmmConsumerConfig().host("host_1:14002").username("user123"));

How do we specify multiple hosts for failback reasons : host_1, host_2, etc.

Can it be done using the libraries or there is any other alternative method?

Thanks

-Parik

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Parik

    Thank you for reaching out to us.

    You need to use the EMA Configurations for configuring failover.

    EMA provides the ChannelSet configuration for failover.

    		<Consumer>
    			<Name value="Consumer_2"/>
    			<!-- 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_1, Channel_2"/>
    			<Dictionary value="Dictionary_2"/>
    			<XmlTraceToStdout value="0"/>
    		</Consumer>

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.