question

Upvotes
Accepted
1 0 0 1

When processing UpdateMsg using multiple threads, keep getting exception when opening the message. Is there way to clone a message for further processing. I believe the UpdateMsg objects keep getting overridden

When processing UpdateMsg using multiple threads, keep getting exception when opening the message. Is there way to clone a message for further processing. I believe the UpdateMsg objects keep getting overridden.

Exception:

2019-09-09 11:29:29 [pool-1-thread-1] ERROR c.b.e.f.reuters.parser.MessageParser - Error com.thomsonreuters.ema.access.OmmInvalidUsageExceptionImpl: Attempt to name() while it is NOT set. at com.thomsonreuters.ema.access.MsgImpl.ommIUExcept(MsgImpl.java:395) ~[ema.jar:emaj3.1.0.L1.all.rrg]

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-apimulti-threading
icon clock
10 |1500

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

Upvotes
Accepted
20.3k 73 10 20

Hi @mizanur.kazi

Have you tried using the EmaFactory.createUpdateMsg(UpdateMsg other) method to clone the UpdateMsg?

This feature was added to ESDK 1.3.1.L1 which is the latest version available here

If you have to use an older version for company policy reasons, then you will need to extract the payload and transfer into your own collection / java object and then perform the processing on your own objects. The incoming UpdateMsg (and other event handlers) is owned by the API and cannot be accessed once the onUpdateMsg event handler returns.

icon clock
10 |1500

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

Upvotes
9.5k 10 5 7

Hello @mizanur.kazi

You can find the document of EmaFactory.createUpdateMsg(UpdateMsg other), all EMA classes and their methods in Elektron Message API Java Edition Reference Manual

icon clock
10 |1500

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

Click below to post an Idea Post Idea