[EMA C++]how to set username and date backup in EmaConfig.xml
hello:
I develop as a consumer with EMA C++.
I use the config file EmaConfig.xml shown as the appendix.
my question is:
1、how to set the username in the EmaConfig?
now I fund the program use the username (get through com whoami) of the machine where the program runing.
2、how to set backup of data source?
for example, I get date form ip1 and ip2, ip2 is backup of ip1, how to set ip1 and ip2 in the file
EmaConfig.
thank you.emaconfig.txt
Best Answer
-
@luxiangyuan
You can't specify the OMM Login in EmaConfig.xml file but as I said previously you have to set it in your application using OmmConsumerConfig class.
Basically, the class provide method addAdminMsg which you can specify a login request message to override the default login request. You can also use the class to specifies information for the Administrative domain(Login, Directory, Dictionary) request message used by EMA.EMA will read the connection or channel details from the EmaConfig.xml and then use the login details you set in the applications instead. The application may read the login information from command line arguments or using your own configuration file.
Below is sample codes to use the class based on 420__MarketPrice__AdminDomainConfig example.
OmmConsumer consumer(OmmConsumerConfig() .operationModel(OmmConsumerConfig::ApiDispatchEnum)
.addAdminMsg(ReqMsg()
.domainType(MMT_LOGIN).name("username").nameType(USER_NAME)
.attrib(ElementList().addAscii(ENAME_APP_ID, "127")
.addAscii(ENAME_POSITION, "127.0.0.1/net")
.addUInt(ENAME_ALLOW_SUSPECT_DATA, 1) .complete())));
consumer.registerClient( ReqMsg().serviceName( "API_ELEKTRON_EDGE" ).name( "JPY=" ), client );0
Answers
-
@luxiangyuan
#1 Do you mean the username for OMM Login?If so, EMA does not have the configuration for setting the username in EMAConfig.xml, it's responsible for the Application to pass the username using OMMConsumerConfig class. Please refer to section 4.4.1.1 OmmConsumerConfig Class Function Calls from EMACPP_ConfigGUide.pdf. Please note that If the username is not set, the application extracts a username from the run-time environment which might be the username of your Windows or Linux.
#2 Do you mean Connection Failover? Please refer to this post for sample ChannelSet config for the failover.
0 -
1、I use the OmmConsumerConfig now, and I know how to set the username;
but for the "Connection Failover" function, I must use the EMAConfig.xml other than the OmmConsumerConfig, and I also found the application use the username of Linux.
so I want to know the offical method to set username when use EMAConfig.xml
2、 yes,what I mean is Connection Failover, I get it, thank you .
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 162 App Studio
- 4 Block Chain
- 5 Bot Platform
- 17 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 370 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛