question

Upvotes
Accepted
3 3 5 6

Does EMA API provide a mechanism to reduce the impact of making many subscriptions in quick succession?

I need to subscribe to numerous items using EMA Java API, doing this quickly would impact other connections/clients, what's the best way to reduce the impact? Adding sleep between subscriptions is one solution, is there another way?

elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-apijava
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 @ahmire.kailer

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

Hi,

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
22.1k 59 14 21

Hi @ahmire.kailer, Pacing the subscriptions in the code is the only mechanism - EMA does not provide any other means.

If you need to subscribe to whole bunch of instruments at once, then please look into the Batch subscriptions. Here is an article showing how to use this feature.

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
3 3 5 6

Hi @Gurpreet.

Thank you for your answer. Am I right in thinking that a single batch request would have very little impact on other streams/clients even if the batch consists of many instruments (e.g. 200k instruments)?

What does the handle returned by registerClient() correspond to when a batch request is used? How do I get the handles for individual instruments? Can I get them in the same thread instead of the callback/dispatch thread?

I had a look at example370__MarketPrice__Batch, it shows how to registerClient(), I'd like to know how to unregister() individual instruments.

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
3 3 5 6

Hi @Gurpreet.

It looks like batch request doesn't support closure objects for individual instruments, right?

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
22.1k 59 14 21

If the batch size is large, it is bound to impact other open streams since the network is getting flooded with new request/responses. This will all depend on the market state and how volatile subscribed instruments are. Once the items are subscribed in the batch, they can still be individually closed. Batch Stream will be closed automatically after server receives a batch request. Consumer application will receive item response on individual streams. To remove subscription for an item, the application needs to get handle of item stream via OmmConsumerEvent,handle() in onRefreshMsg(), and then use the handle in the OmmConsumer.unregister() method.

EMA developer guide which is included with ESDK package has more information on the batch.

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.

Upvote
24.7k 54 17 14

Hello @ahmire.kailer

The application may implement a subscription throttle in the application level to not send all item request messages to the API in the same time. For example,

  • the application may send a smaller number of items in multiple batch requests instead of all items in one batch
  • the application may not send the next batch request until all responses of the previous batch request are received
  • Or the application uses a timer to send each batch request


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.