question

Upvotes
Accepted
25 6 5 11

Read EMAconfig.xml from custom path

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

elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-api
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
9.6k 10 7 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 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.