Elecktron programtic config

std::stringstrSeverName("Server01");
MapinnerMap;
ElementListelementList;
// ConsumerGroup
elementList.addAscii( "DefaultConsumer", "Consumer_1" );
innerMap.addKeyAscii( "Consumer_1", MapEntry::AddEnum, ElementList()
.addAscii( "ChannelSet", "Channel_1,Channel_2" )
.addAscii( "Logger", "Logger_1" )
.addAscii( "Dictionary", "Dictionary_1" )
.addUInt( "ItemCountHint", 5000 )
.addUInt( "ServiceCountHint", 5000 )
.addUInt( "ObeyOpenWindow", 0 )
.addUInt( "PostAckTimeout", 5000 )
.addUInt( "RequestTimeout", 5000 )
.addUInt( "MaxOutstandingPosts", 5000 )
.addInt( "DispatchTimeoutApiThread", 1 )
.addUInt( "HandleException", 0 )
.addUInt( "MaxDispatchCountApiThread", 500 )
.addUInt( "MaxDispatchCountUserThread", 500 )
.addInt( "ReactorEventFdPort", 45000 )
.addInt( "PipePort", 4001 ).complete() ).complete();
elementList.addMap( "ConsumerList", innerMap );
elementList.complete();
innerMap.clear();
m_ConfigMap.addKeyAscii( "ConsumerGroup", MapEntry::AddEnum, elementList );
elementList.clear();
// ChannelGroup
innerMap.addKeyAscii( "Channel_2", MapEntry::AddEnum, ElementList()
.addEnum( "ChannelType", 0 )
.addAscii( "InterfaceName", strSeverName.c_str() )
.addEnum( "CompressionType", 0) // 0 none compression
.addUInt( "GuaranteedOutputBuffers", 5000 )
.addUInt( "ConnectionPingTimeout", 50000 )
.addInt( "ReconnectAttemptLimit", 10)
.addInt( "ReconnectMinDelay", 2000 )
.addInt( "ReconnectMaxDelay", 6000 )
.addAscii( "Host", strSeverName.c_str() )
.addAscii( "Port", "14002" )
.addUInt( "TcpNodelay", 1 ) // 1 mean no delay, 0 mean Nagle’s algorithm
.addUInt( "XmlTraceToFile", 0 ) // 0 : Turns off tracing, 1: Turns on tracing to an XML file.
.addUInt( "MsgKeyInUpdates", 1 ).complete());
innerMap.addKeyAscii( "Channel_1", MapEntry::AddEnum, ElementList()
.addEnum( "ChannelType", 0 )
.addAscii( "Host", strSeverName.c_str() )
.addAscii("Port", "14002" ).complete() ).complete();
elementList.addMap( "ChannelList", innerMap );
elementList.complete();
innerMap.clear();
m_ConfigMap.addKeyAscii( "ChannelGroup", MapEntry::AddEnum, elementList );
elementList.clear();
// LoggerGroup
innerMap.addKeyAscii( "Logger_1", MapEntry::AddEnum,
ElementList()
.addEnum( "LoggerType", 1 ) // 1 is stdout
.addEnum( "LoggerSeverity", 1 ).complete() );
innerMap.addKeyAscii( "Logger_2", MapEntry::AddEnum,
ElementList()
.addEnum( "LoggerType", 0 )
.addAscii( "FileName", "logFile" )
.addEnum( "LoggerSeverity", 1 ).complete() ).complete();
elementList.addMap( "LoggerList", innerMap );
elementList.complete();
innerMap.clear();
m_ConfigMap.addKeyAscii( "LoggerGroup", MapEntry::AddEnum, elementList );
elementList.clear();
//DictionaryGroup
innerMap.addKeyAscii( "Dictionary_1", MapEntry::AddEnum,
ElementList()
.addEnum( "DictionaryType", 1).complete());
innerMap.addKeyAscii( "Dictionary_2", MapEntry::AddEnum,
ElementList()
.addEnum( "DictionaryType", 0)
.addAscii( "RdmFieldDictionaryFileName", "./RDMFieldDictionary" )
.addAscii( "EnumTypeDefFileName", "./enumtype.def" ).complete() ).complete();
elementList.addMap( "DictionaryList", innerMap );
elementList.complete();
m_ConfigMap.addKeyAscii( "DictionaryGroup", MapEntry::AddEnum, elementList );
elementList.clear();
m_ConfigMap.complete();
/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
error message is here, both logger_1 and Dictionary_1 is failed, why?
loggerMsg
TimeStamp: 15:17:54.885
ClientName: EmaConfig
Severity: Error
Text: no configuration exists for consumer dictionary [DictionaryGroup|Di
ctionaryList|Dictionary.Dictionary_1|]; will use dictionary defaults
loggerMsgEnd
loggerMsg
TimeStamp: 15:17:54.886
ClientName: EmaConfig
Severity: Error
Text: no configuration exists for consumer logger [LoggerGroup|LoggerList
|Logger.Logger_1|]; will use logger defaults
loggerMsgEnd
Best Answer
-
If I paste an EmaConfig.xml file which contains only empty "Logger_1" and "Dictionary_1" node, the error message will not be logged. I believe that the errors are generated when EMA try to load the nodes from the EmaConfig.xml file which doesn't exist. The programmatic configuration should still work correctly, even though these error are generated.
The EmaConfig.xml file I use is below. If you would like to try the file in your application, the additional nodes should be added for "Logger_2" and "Dictionary_2".
<?xml version="1.0" encoding="UTF-8"?>
<EmaConfig>
<LoggerGroup>
<LoggerList>
<Logger>
<Name value="Logger_1"/>
</Logger>
</LoggerList>
</LoggerGroup>
<DictionaryGroup>
<DictionaryList>
<Dictionary>
<Name value="Dictionary_1"/>
</Dictionary>
</DictionaryList>
</DictionaryGroup>
</EmaConfig>0
Answers
-
Even I use the same code in 4.4.3
Example: Programmatic Configuration
still get the same error message.Would someone help to repeat that? thanks.
0 -
There is a forum for Elektron. If you move this question there using the cog icon top right, it will be answered faster.
0 -
421__MarketPrice__ProgrammaticConfig
have the same problems.
0 -
I have found the same errors in logger with the 421__MarketPrice__ProgrammaticConfig application, even though the Logger and Dictionary configurations are configured properly. I will investigate the issue further and let you know the result.
0 -
Thanks for explaining that. that message should be a warning message with more details what happening. hopefully that will be in next realease.
btw, I am assuming EmaConfig.xml overwrite programmaticConfig, is that right?
0 -
The programmatic config should override the parameters configured in EmaConfig.xml file. Please see the screenshot of the EMA Configuration Guide document for reference.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 251 ETA
- 555 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 643 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 916 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛