offstream post: Failed to uninitialize OmmBaseImpl
When we do an offstream post, we get:
Text: Failed to uninitialize OmmBaseImpl (_executor.awaitTermination() timed out).
Create OmmConsumer, register login client, post message after refresh, get ack message, call ommConsumerUninitalize ends with the above error.
Best Answer
-
Thanks for the update.
The code is based on the offstream post example.
Post messages are accepted and acknowledged with the ackMsg callback, then after a call to uninitialise is triggered and result in error.
The code runs in a java application hence a thread is created for the post, so when the uninitialize method is reached there is an active thread.
0
Answers
-
Hello @niz,
As you are work with EMA Java, I would like to suggest:
1. Double-check that your recipient ( is it a custom provider) accepts posts.
2. In your Refinitiv Realtime SDK -> EMA -> Examples, select simple example 341, MarketPrice OffStream Post, and retest,
To confirm if by using the example you are able to post successfully and and consumer.uninitialize() without errors. If that works, then next you can modify the working example to implement your custom use case.
0 -
Hello @niz,
I hear what you observe and understand the scenario in theory.
I have run the example several times (MS Win, ESDK 1.5, EMA Java consumr example 341) and was unable to reproduce "Text: Failed to uninitialize OmmBaseImpl (_executor.awaitTermination() timed out)." in uninit.
Next, I have shortened sleep/run from 60000 to 6000 and to 600, and still I could not reproduce.
I have also posted to invalid RIC, got a Nack, but still no such error.
What version of SDK do you test with? Anything special that you do?
Basically, to try to understand, we would need to be able to reproduce.
0 -
The code is running in a web application, as an example the post request comes from a web request, that is passed to a Class that has a client implementation in it, and it does post, after the ack is recieved it does uninitialize.
The REST example that is on refinitiv could be used, extended to accpet a post request.
The code uses EMA libs 3.5.1.0
0 -
Hello @niz,
My understanding now is, that you are able to use EMA postiing example 341, that came with SDK 1.5, to post successfully, and to uninitialize without issues?
Are you able to provide a minimal example, that we can run to reproduce the issue, or a way, to reproduce it with the standard example from SDK?
Iif the issue is with Realtime SDK, this will help us to troubleshoot and fix the issue, if the issue is with your custom app, it will help you to get to the bottom of the issue and fix it.
0 -
testPublish.zip sample example attached.
Update application.yml with the trep host, and app id.
Use rest endpoint to post a publish requestPOST: testPublish.ziphost/DACS_USERNAME/SERVICE/INSTRUMENT
0 -
Hello @niz,
Thank you. I appreciate that it took time and effort to produce the example.
I have taken several attempts to import it into my Eclipse, did not go through for me, multiple errors.
A couple of thoughts:
Please confirm, that you are not able to reproduce the uninitialization error when running EMA example 341 found with SDK, and only see the error when you initialize and uninitialize via spring?
Are you on the first version of RSDK, 2.0 or the latest version of ESDK 1.5, or it's one of the earlier versions ( some issue have been fixed since)?
On the code:
Uninitialize() should only be called once. it seems that you are posting multiple times, by the number of instruments on the list. Each post should solicit an Ack. That will result in logout() that calls uninitialize(). Please verify, printing is the easiest.
I would also not call unitialize from ackMessage callback, even if you post only once, and this is the only ack, as some other callbacks, refresh, status, ect., may be received after the ack callback.
Let us know if this helps?
0 -
The root cause is threads, as when the publish web request has its own thread executor and the publish request get one of its own by the API, moving the uninitialize to the initializing thread solves the issue
0 -
Hello @niz,
For test purposes, I have taken EMA consumer example 341 (single file, no additional threads other then introduced by the library itself)), and tested uninitialize from Ack, same as you have shown in the minimal example code:
public void onAckMsg(AckMsg ackMsg, OmmConsumerEvent event)
{
System.out.println("Received AckMsg. Item Handle: " + event.handle() + " Closure: " + event.closure());
decode( ackMsg );
System.out.println();
System.out.println("About to uninitialize() in onAckMsg");
((OmmConsumer)event.closure()).uninitialize();
System.out.println("After uninitialize() in onAckMsg");
}It has resulted in the same error that you see, without any additional threads being introduced:
Text: Failed to uninitialize OmmBaseImpl (_executor.awaitTermination() ti
med out).
loggerMsgEndThis is because at the time that ack message is received, after it, there are still messages to be received, status, login closure, etc.
In the custom consumer, please make sure to receive all the messages, prior to calling uninit, this should be the right approach.
Let us know how this works for you?
1
Categories
- All Categories
- 6 AHS
- 39 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 中文论坛