For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 1 4

Specify multiple ADS hosts in OMMConsumer config

Hi,

when creating a OMMConsumer I'm able to specify host and port in OmmConsumerConfig. Is there a way of specifying multiple hosts (ADS's)?

Should I perhaps use EmaConfig.xml? If yes, could you point me which section/tags are responsible for that.

Thank you,

Miro

elektronrefinitiv-realtimeelektron-sdk
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
7.6k 15 6 9

@m87

You can use ChannelSet and specifies a comma-separated set of channels names. Each listed channel name should have an appropriate <Channel> entry in the ChannelGroup. Channels in the set will be tried with each reconnection attempt until a successful connection is made. Below is the example configuration

<ConsumerGroup>
	<ConsumerList>
		<Consumer>
		<Name value="Consumer_1"/>
		<!-- ChannelSet is optional -->
			<ChannelSet value="Channel_1, Channel_2"/>
			<!-- Logger is optional: defaulted to "File + Success" -->
			<Logger value="Logger_1"/>
			<!-- Dictionary is optional: defaulted to "ChannelDictionary" -->
			<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="122.1.1.100"/>
			<Port value="14008"/>
		</Channel>
	</ChannelList>
</ChannelGroup>

If you application connecting to the server on Channel_1 and then it down, EMA will connect to other Channel in the ChannelSet configuration.

You can find more details from EMACPP_ConfigGuide.pdf section 3.1.4, 3.3.6 and 3.3.7.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.