question

Upvotes
Accepted
1 0 2 7

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-sdkema-apirrtelektron-message-apimulti-threading
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
Accepted
25.2k 87 11 25

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 512.0 KiB each and 1.0 MiB total.

Upvotes
9.6k 10 7 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 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.