question

Upvotes
Accepted
25 2 5 9

Read EMAconfig.xml from custom path

In the latest version, how to read EMAconfig.xml from custompath instead of current directory?

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.

1 Answer

Upvotes
Accepted
9.5k 10 5 7

Hello @sagar.s

In EMA Java, you can use EmaFactory.createOmmConsumerConfig(java.lang.String) to specify your custom path which EMAconfig.xml is in as explained in Elektron-SDK1.1.1.java.eload/Ema/Docs/refman/emajava/com/thomsonreuters/ema/access/EmaFactory.html shown below:

For example: To read EMAconfig.xml in the folder C:\myEMAProjects, an example snipped source code in EMA java application is:

consumer  = EmaFactory.createOmmConsumer(EmaFactory.createOmmConsumerConfig("C:\\myEMAProjects").consumerName("Consumer_2"));

EMA C++ also provides the same feature in OmmConsumerConfig(EmaString). An example snipped source code is:

OmmConsumer consumer( OmmConsumerConfig("C:\\myEMAProjects").consumerName( "Consumer_2" ) );

For the complete applications, please refer to

EMA Java: example111__MarketPrice__UserSpecifiedFileConfig

EMA C++: 111__MarketPrice__UserSpecifiedFileConfig


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