New posts are disabled while we improve the user experience.

You can browse the site, or for urgent issues, raise a query at MyAccount.

question

Upvotes
Accepted
9 3 3 7

[EMA Java] How to retrieve the client id in OmmConsumerClient.onStatusMsg

the method OmmConsumer.registerClient returns a long value (id) that can be used later to unregister, etc. Can this value be retrieved from either the statusMessage or event received in OmmConsumerClient.onStatusMsg(StatusMsg msg, OmmConsumerEvent event) ?

refinitiv-realtimeelektronelektron-sdkema-apirrtelektron-message-apijavaconsumer
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.

1 Answer

· Write an Answer
Upvotes
Accepted
25.4k 90 13 26

hi @andre.malenfant

You can get the handle from the OmmConsumerEvent using

event.handle();

in the onStatusMsg Callback.

Note that if the StreamState of the item is already CLOSED when you receive the StatusMsg then you do not need to call unregisterClient - as the stream has already been closed off.

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.