Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Elektron /
  • EMA /
avatar image
Question by anshul.gupta2 · Jun 11, 2020 at 09:02 AM · elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-apiOMM

EMA ommconsumer uninitialize() not working causing memory leak in Java

The flow of our application is:

  1. create OmmConsumerConfig
  2. pass config to newly created OmmConsumer
  3. register interest, get the required data and unregister
  4. finally we uninitialize()

The problem we are seeing is that the connection is not closed. Every time the app runs it creates a new connection. This is causing high CPU load and memory leak.

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by umer.nalla · Jun 11, 2020 at 09:29 AM

Hi @anshul.gupta2

Can you confirm which version of the EMA Java API you are using? The latest version of 1.5.0.L1 is available here.

Also, are you able to recreate by taking one of our basic examples and making minimal modifications to implement the above usage scenario?

In addition to the above, the key thing I should point out is that the above usage scenario is far from optimal.

When you create an OmmConsumer and pass the config etc, there is a lot of background process taking place e.g. connect + login to server, download directory of services, download dictionary (or load local) etc - all of which takes time and places a potentially unnecessary burden on your resources.

The recommended approach would be to create the OmmConsumer once and continue to use that same instance to consume data as often and whenever required.

Note that if you are making Snapshot request i.e.RefreshMsg only and not interested in Updates, then you can use Snapshot mode - so that the API unregisters each instrument for you automatically once it has responded with the RefreshMsg (or closed StatusMsg for invalid requests).

consumer.registerClient(reqMsg.serviceName("DIRECT_FEED").name("IBM.N")
.interestAfterRefresh(false), appClient);

However, if your particular implementation requires you to create, register and uninitialize then please respond with a simple application which demonstrates your implementation and the problem - so we can recreate and report to the development as appropriate.


Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
anshul.gupta2 · Jun 19, 2020 at 08:15 AM 0
Share

Thanks, updating to latest version has fixed the issue.

avatar image
Answer by niz · Aug 21, 2020 at 02:33 PM

what will be the case for DACS enabled servies, the OmmConsumer is created with the DACS user name, for a different user a different OmmConsumer instance is created as the username is passed to the connection config, if we have a long running process or application that is serving multiple users the issue with the connection kept open will result in memory leak andconsumers being stuck in memory, and only become dirty when the java application exits.

And this is the case when we have batch-view for multiple instruments and an open stream.

Then for each OmmConsumer a Login handle is needed to mapped and stored with the consumer and when no clients are retrieveing stream, unregister the login handle

And also manage the stream update handle to close the individual streams that end up being created by the batch view.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
10 People are following this question.

Related Questions

Migrating from sfc to EMA, NoDictionary errorcode.

Exception occurred: com.sun.jdi.InvocationException occurred invoking method..

EMA InteractiveProvider- frequent disconnects

OmmConsumer reopens all RIC streams every 15 seconds

exceeded initialization timeout (5 s)

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges