How to avoid timeout status messages

Hi All,
In my Elektronsnap client, which is written in C++, the consumer object is created like this:
consumer.registerClient(ReqMsg().serviceName("ELEKTRON_DD").payload( ElementList().addArray(ENAME_BATCH_ITEM_LIST, ommarr).complete()).interestAfterRefresh( false ), client);
and the dispatch() method is called by 10 microseconds:
consumer.dispatch( 10 );
On the run I got lots of onStatusMsg with state OmmState::TimeoutEnum. I need the data about the timed out items. Could you tell me what is the best way to get this data?
Thanks
Best Answer
-
This could be a request timeout in the EMA API. The default value is 15 seconds.
With this default value, the consumer will wait for a response to a request for 15 seconds before sending another request. If this happens, the application will get the following status message.
Item State: Open / Suspect / Timeout / 'Request timed out.'
The stream state is still open which means that the API will do an item recover on behalf of the application. Typically, the application just calls consumer.dispath until it gets all data.
If the application requests a lot of items, you may increase the value of RequestTimeout in the consumer and wait for the API to get the data.
Otherwise, instead of depending on the EMA API to recover items, the application can perform its own recovery logic by unregistering the handles of those timeout items and then sending a new batch request for those items.
0
Answers
-
Hi @peter.meszaros,
When you receive a status message via onStatusMsg, you can query the details related to the data item by accessing the .getName(), .getServiceName() etc from the StatusMsg interface. For example, you can refer to EMA Consumer - Decoding MarketPrice data tutorial source code for an example. In there, you will find a code snippet showing how to extract details related to a status message:
I'm showing the code snippet where some details are extracted. In addition, you can see other attributes available to you using Visual Studio's intellisense.
0 -
Hi Jirapongse,
When I set RequestTimeout to 0 then I got a few warnings followed by an error message:
ClientName: LoginCallbackClient
Severity: Warning
Text: RDMLogin stream state was changed to suspect with status message
State: Open / Suspect / Timeout / 'Request timed out.'
...
Severity: Error
Text: RDMLogin stream was closed with status message
State: Closed / Suspect / Login rejected, exceeded maximum number of mounts per user / 'Exceeded maximum number of mounts per user.'But if I set RequestTimeout to 3600000 (1hour) then it works as expected. Anyways, now I have a working solution. Thanks a lot.
Regards
0 -
Hi Nick,
Thanks your comment. However my point is how to eliminate timeout, not how to get the message details.
0
Categories
- All Categories
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 33 Data Model Discovery
- 682 Datastream
- 1.4K DSS
- 613 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
- 248 ETA
- 552 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
- 2 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.8K Refinitiv Data Platform
- 622 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
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 84 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛