question

Upvotes
Accepted
3 0 0 3

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-sdkrrtema-apielektron-message-apijava
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
13k 32 12 18

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 5.0 MiB each and 10.0 MiB total.

Upvotes
3 0 0 3

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 5.0 MiB each and 10.0 MiB total.

Upvotes
3 0 0 3

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 5.0 MiB each and 10.0 MiB total.

Upvotes
13k 32 12 18

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 5.0 MiB each and 10.0 MiB total.

Upvote
11.5k 16 7 10

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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea