By creating an EmaConfig.xml file and
setting multiple channels (one per server) it will automatically connect to the
second channel if the first channel fails.
However I can't work out how to set the ezd
username in the code.
Normally (no EmaConfig.xml file) I would do
the following...
OmmConsumerConfig config = EmaFactory.createOmmConsumerConfig();
consumer = EmaFactory.createOmmConsumer(config.host("ezd-a:14002").username(ezdUsername));
However when an EmaConfig.xml file is used
I am supposed to specify the Consumer name from the EmaConfig.xml file as per
below.... But I can't find where to specify the ezd username in this approach.
Specifying a config.host(....) will override the multi channel config, and
trying to set the username directly against the config (as per below) does not
work either...
OmmConsumerConfig
config = EmaFactory.createOmmConsumerConfig().consumerName("Consumer_2");consumer
= EmaFactory.createOmmConsumer(config.username(ezdUsername));