question

Upvotes
Accepted
25 6 5 11

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)

elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-api
icon clock
10 |1500

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

@sagar.s
Thank you for your participation in the forum.
Are the replies below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.
Thanks,
-AHS

Hello @sagar.s

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If yes, please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,
AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such. Thanks, AHS

Upvotes
Accepted
136 3 3 3

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).

icon clock
10 |1500

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

Upvotes
1.9k 7 10 16

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

icon clock
10 |1500

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

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

Upvotes
25 6 5 11

What is the difference between unregister and uninitialize functions in ommconsumer?

Is it necessary to call unregister fuction prior to calling uninitialize function?

icon clock
10 |1500

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

Upvotes
121 1 0 1

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.

icon clock
10 |1500

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

Upvotes
25 6 5 11

Hi @Nipat Kunvutipongsak

When will the ESDK-1.1.2.G1 version be released? I beleive the concurrent modification exception is addressed in that version.

Thanks,

Sagar

icon clock
10 |1500

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

@sagar.s

It's been released as open source version on Github.

https://github.com/thomsonreuters/Elektron-SDK/releases

@Warat B.

Is the concurrent modification issue resolved in below version ?

Elektron SDK - Java - 1.1.1.E1

Thanks,

Sagar

@sagar.s

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)
Upvotes
1 0 0 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 ?

icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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