RTO EMA C++ consumer destructor 'Segmentation fault (core dumped)'
Considering this code snippet:
For the destructor method, it got the following 'Segmentation fault (core dumped)' error:
So the question is
1) is that allow to call the destructor (to cleanup) of the consumer and then create a new one theoretically? And why we see those error?
2) For EMA C++, is that true the handler (onRefreshMsg, onStatusMsg,...,) logic runs in a separate thread other that the 'main' thread?
3) Is there any case that EMA cannot recover the connection and quit the application (even set the attemptLimit = -1)?
4) In the case of Login Stream CLOSED due to some issue, does the application need to destroy the old consumer and create a new one, how to do that in the onStatusMsg method implementation?
Best Answer
-
Hi @Frederic
As per your final question above, on a Force Logout from Dacs where the Login Stream is closed, you would need to delete the OmmConsumer and create again to initiate a new connection + login etc.
0
Answers
-
Hi @Frederic
Firstly, I don't understand why the code above is calling the destructor explicitly - I am not a hardcore C++ developer - but I have always been advised that we should never call the destructor explicitly.
I tested an EMA Example on Linux (WSL) and If I call the destructor explicitly as in the code snippet above, I also see a Segmentation fault. If, however, I delete the OmmConsumer instance then I do not see the segmentation fault.The event handlers do run in a separate thread to the main application thread.
If ReconnectAttemptLimit is set to -1, it should continue to try and connect indefinitely - unless of course, the main() function exits (e.g. in most of the EMA examples we have a 60s time limit).
If the Login Stream is closed then all streams are closed and the connection is closed, so they would need to create a new OmmConsumer. In terms of deleting and creating a new OmmConsmer - this should be down to standard C++ coding and the developer would need to implement the appropriate strategy in their code. For example, the EMA example 410 creates multiple OmmConsumer by creating a separate class called ConsumerManager - so even here the developer could have a separate class that handles creating and deleting an OmmConsumer on demand.
0 -
Thank you for the helpful information, I will have a check
0 -
In such case of Login Stream closed not intended (maybe due to connection issue?), will the EMA auto recover that?
0 -
Take the 'Force Logout from DACS' example (https://community.developers.refinitiv.com/questions/87314/rto-force-logout-from-dacs-in-the-ema-login-domain.html), the connection was closed by server.
In such case will the EMA recover the connection? (maybe this question will go to the Reactor implementation)Or we should delete the consumer then recreate?
(Looks like the client encountered some issue that duplicated messages are received... do not have much detail on that.)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
- 690 Datastream
- 1.4K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 279 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 716 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
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛