question

Upvotes
Accepted
1 0 4 8

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.

Hello @mizanur.kazi,

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
25.3k 87 12 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.