EMA C++ - Reconnection to ADS
Hi ,
Is there any callback , or an exception thrown when the connection to ADS Server is lost ?
Basically to handle reconnect behaviour in EMA Consumer - C++ clients
Best Answer
-
Please refer to the EmaCPP_ConfigGuide.pdf which comes with the SDK.
You can set the filename +path by amending your Logger entry in the EmaConfig.xml or via your programmatic config.
<Logger>
<Name value="Logger_2"/>
<LoggerType value="LoggerType::File"/>
<!-- FileName is optional: defaulted to "emaLog_<process id>.log"-->
<FileName value="c:\temp\emaLogUN"/>
<LoggerSeverity value="LoggerSeverity::Success"/>
</Logger>Obviously, you will need to change your Consumer Config definition to reference the correct Logger config e.g. in this case Logger_2
Also, if you want to know the state of connectivity to server within the application, you can manually register for the Login Domain stream.
Please refer to the 330__Login__Streaming example that comes with the SDK. Also, refer to the 360__MarketPrice__ConnectionRecovery example which uses the login state to control its behaviour.
So, for example with the above example you may get something like the following when the connection to server is lost after a previously successful login and connection:
Item Name: user
Service Name: <not set>
Item State: Open / Suspect / None / 'channel down'
loggerMsg
TimeStamp: 12:09:10.070
ClientName: LoginCallbackClient
Severity: Warning
Text: RDMLogin stream state was changed to suspect with status message
username user
usernameType 1
.....
State: Open / Suspect / None / 'Channel is down.'
loggerMsgEndAnd then something like the following when the connection is restored:
Item Name: user
Service Name: <not set>
Item State: Open / Ok / None / 'channel up'
Handle: 2424268995088 Closure: 0000000000000001
Item Name: user
Service Name: <not set>
Item State: Open / Ok / None / 'Login accepted by host training1x.'
......Hope that helps.
0
Answers
-
Regarding callback for connection lost, you can refer to the answer in this question.
For recovery, EMA will reconnect to the server and then re-request all subscribed items on behalf of application. Application will receive refresh messages for all items.
0 -
Thanks a lot - The events are also logged in emaLog .
Could you please help specifying a definite location for emaLog instead of the directory in which application is run ?
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 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
- 367 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
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛