Problem while uninitializing the ommconsumer
Hi Team,
I'm getting concurrent modification exception issue when trying to close the ommcomsumer. Can you please take a look at the issue? Is it a known issue in the api?
Nov 20, 2017 5:11:54 PM com.thomsonreuters.ema.access.ChannelDictionary processCallback WARNING: loggerMsg ClientName: ChannelDictionary Severity: Warning Text: RDMDictionary stream was closed with status message streamId 3 Reason State: Closed/Suspect/None - text: "Login stream was closed." loggerMsgEnd Nov 20, 2017 5:11:54 PM com.thomsonreuters.ema.access.ChannelDictionary processCallback
WARNING: loggerMsg ClientName: ChannelDictionary Severity: Warning Text: RDMDictionary stream was closed with status message streamId 4 Reason State: Closed/Suspect/None - text: "Login stream was closed." loggerMsgEnd
Exception in thread "main" java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.remove(HashMap.java:1451) at com.thomsonreuters.ema.access.OmmBaseImpl.rsslReactorDispatchLoop(Unknown Source) at com.thomsonreuters.ema.access.OmmBaseImpl.uninitialize(Unknown Source)
Best Answer
-
Note that the OMMConsumer.uninitialize() method call will very likely fail if there are many items still registered receiving updates. Unregistering all items, waiting a bit, calling OMMConsumer.uninitialize() might mitigate the risk of failure, but still you might hit the moment when the dispatch thread is processing some heartbeat or info messages and get into the same CME error.
The OMMBaseConsumer synchronization model between caller threads and dispatch thread is wrong or rather not existing at all causing CME and other errors being thrown randomly (more you use it, more error situations you get).0
Answers
-
Hello @sagar.s,
There was a similar exception message and this problem has been submitted to the developer already.
Reference:
Question - ConcurrentModificationException in EMA
Git Hub Issue - https://github.com/thomsonreuters/Elektron-SDK/issues/34
0 -
What is the difference between unregister and uninitialize functions in ommconsumer?
Is it necessary to call unregister fuction prior to calling uninitialize function?
0 -
You don't have to call unregister function before calling uninitialized. Once the application calls uninitialize(), EMA will close user login, close channel and shutdown reactor and ommConsumer ...everything. Unregister call is for user to close an uninterested item request.
0 -
Hi Nipat,
When will the ESDK-1.1.2.G1 version be released? I beleive the concurrent modification exception is addressed in that version.
Thanks,
Sagar
0 -
When will the ESDK-1.1.2.G1 version be released? I beleive the concurrent modification exception is addressed in that version.
Thanks,
Sagar
0 -
@sagar.s
It's been released as open source version on Github.
0 -
Elektron SDK - Java - 1.1.1.E1 contains a fix of the ConcurrentModificationException issue. Please see the excerpt of the latest EMA's README file below:
Product Name: Elektron Message API - Java Edition
Release Number: 3.1.1
Load ID: ema3.1.1.E1.java
Release Status: ELOAD
Release Type: ELOAD
...
2.1.1 Service Requests Resolved In This Release
[ESDK-1120] Investigate ConcurrentModificationException in EMA (GitHub #34)
[ESDK-1220] ConcurrentModificationException while invoking dispatch() (Case No. 06107164)0 -
Hello Dev Team,
Currently I have the version Elektron-SDK1.1.1.java in my application, but I got somethink like a deadlock :
"main" prio=6 tid=0x0000000002cf4000 nid=0xb38 waiting on condition [0x0000000002cee000] java.lang.Thread.State: TIMED_WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x00000000cf1d2440> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2082) at java.util.concurrent.ThreadPoolExecutor.awaitTermination(ThreadPoolExecutor.java:1468) at java.util.concurrent.Executors$DelegatedExecutorService.awaitTermination(Executors.java:635) at com.thomsonreuters.ema.access.OmmBaseImpl.uninitialize(OmmBaseImpl.java:300) at com.thomsonreuters.ema.access.OmmConsumerImpl.uninitialize(OmmConsumerImpl.java:102)
Could you advice please ?
0
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
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛