Infinite loop querying refinitiv using EMA
Hello,
We are encountering a problem when using the streaming API to retrieve quotes.
We're using a module that's very similar to your example module (ValueAddObjectsForEMA).
This module uses the EMA library, and we've noticed the following malfunction:
When the refinitiv server we're using is unreachable (due to unavailability or network problems, for example), the program enters an infinite loop in the function below. infinite loop method
Please here a screenshot of the stacktrace.
We never get out of the loop, even if communication with the server is re-established. Do you have an idea for a fix on the EMA library side? If so, could you do it in your example module, please? Thank you in advance for your help.
Best regards
Best Answer
-
Hi @mickael.bourdel,
I looked at the sample and tried to see what you are reporting. The sample is working fine - EMA SDK is designed to auto-reconnect to the lost connection and recover all the open subscriptions on behalf of the application; thereby saving all the rudimentary recovery coding overhead in the application.
To test this, I shutdown the ADS which provides the chain data and started the example and restarted the ADS at some point. The sample was able to successfully connect and get the data.
However, if the connection is not established for a long time, the application gets the Login error and terminates:
Feb 01, 2024 1:06:56 PM com.refinitiv.ema.access.OmmBaseImpl handleLoginReqTimeout
SEVERE: loggerMsg
ClientName: Consumer_1_1
Severity: Error
Text: login failed (timed out after waiting 45000 milliseconds) for localhost:14002)
loggerMsgEnd
Feb 01, 2024 1:06:56 PM com.refinitiv.ema.access.ChannelCallbackClient reactorChannelEventCallback
SEVERE: loggerMsg
ClientName: ChannelCallbackClient
Severity: Error
Text: Received ChannelDown event on channel Channel_1
Instance Name Consumer_1_1
RsslReactor Channel is null
Error Id 0
Internal sysError 0
Error Location Reactor.processWorkerEvent
Error text Error initializing channel: errorId=-1 text=Connection refused: no further information
loggerMsgEnd
ERROR - Can't create the OmmConsumer because of the following error: login failed (timed out after waiting 45000 milliseconds) for localhost:14002)
>>> Exiting the applicationYou can configure this timeout parameter in the EMAConfig xml file - LoginRequestTimeOut.
0
Answers
-
Hi @mickael.bourdel,
I can see that you are using the Chain module in the Value Added Example. In the effort to identify where this issue is happening - do you see this problem when you run the example code without modification?
0 -
Hello @Gurpreet,
Thank you for your response,
I've tried the example you asked for, with a slight modification to the way the ommConsumer is created, as follows to match my actual usage.
When I run the program under the same conditions as above (server unreachable), I get the following log and it's blocked.
And when I try to debug, I get the same behavior as before, I notice that it keeps switching here, and the state always stays at the state "OPENING". On class FlatChainImpl
Thanks again for your help.
Sincerely
0 -
Here's where it gets stuck, I couldn't put more than two attachments in my comment.
Thanks a lot!
0 -
Hi @mickael.bourdel,
The infinite loop that you mention is the event dispatch loop - which happens because you have chosen OperationModel.USER_DISPATCH.
What are you expecting from the sample - when the market data servers are not reachable - i.e OMM Consumer is not able to establish a connection to the server?
0 -
Hello @Gurpreet,
I expect the sample not to block indefinitely, that at some point it falls into error and move on. Or, if the server can be reached again quickly enough, resume the thread as normal.
Currently, if the server is either unreachable for a short period of time and is queried at that time, we enter a state where we can't get out.
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 中文论坛