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 -
Is the concurrent modification issue resolved in below version ?
Elektron SDK - Java - 1.1.1.E1
Thanks,
Sagar
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
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 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
- 252 ETA
- 556 WebSocket API
- 38 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
- 3 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.9K Refinitiv Data Platform
- 652 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
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛