question

Upvotes
Accepted
3 1 0 0

(JAVA) Does using interestAfterRefresh(false) remove the need for deregistering items with Elektron?

Hello,

I just have a quick question regarding interestAfterRefresh. Our application at times may be registering many RICs with elektron at once, and it could potentially hit our elektron license cap. By using:

consumer.registerClient(reqMsg.serviceName("DIRECT_FEED").name("IBM.N").interestAfterRefresh(false), appClient);

Does this remove our need to unregister RICs manually? Also documentation states that a response may come in the form of one or more messages, if it does unregister automatically, can we assume it will be after all messages have been sent?

Thanks!

elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-apijavaunregister
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.3k 87 12 25

Hi @andrew.richardson

InterestAfterRefresh(false) specifies that you want to make a Snapshot i.e non-streaming request.

So, if the instrument you request is a valid one (and you are permissioned for it), you should get a RefreshMsg for that instrument and the API will automatically unregister and close the stream for that instrument - you will not receive any Updates.
If the server is not able to supply the RIC - e.g. it is invalid or you are not permissioned for it - then you will get a StatusMsg indicating this and the stream will be closed also.

If you want streaming data i.e. a Refresh, followed by updates then you need to set InterestAfterRefresh(True) - which is the default mode - and so does not need to be explicitly specified.

A MarketPrice request (the default) will provide all data in a single RefreshMsg.

For other domains such as MarketByPrice, you can expect to receive Multiple Refresh - with the final one having the completion flag set.

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.

Thank you very much, this answered our question perfectly.

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.