question

Upvotes
Accepted
1 1 1 1

How to speed up the response to a large number of RIC codes?

Hi. I'm sending a request with 1700 RIC codes in the form of a batch. It is necessary that the response for all codes does not exceed 0.5 seconds.

An example of my request.

OmmConsumer consumer = EmaFactory.createOmmConsumer(EmaFactory.createOmmConsumerConfig().host(host).username(user));
ElementList batch = EmaFactory.createElementList();
OmmArray ommArray = EmaFactory.createOmmArray();
if(!codesList.isEmpty()) {
    for (String code : codesList) {
        ommArray.add(EmaFactory.createOmmArrayEntry().ascii(code));
    }
    batch.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_BATCH_ITEM_LIST, ommArray));
}

ReutersConsumer reutersConsumer = new ReutersConsumer();//implements OmmConsumerClient
consumer.registerClient(EmaFactory.createReqMsg().domainType(EmaRdm.MMT_MARKET_PRICE).serviceName(feedName).payload(batch).interestAfterRefresh(false), reutersConsumer);

Now the response takes about 3 seconds.

How can I organize my code to achieve the fastest possible response?

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-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.

1 Answer

Upvotes
Accepted
665 3 5 6

Hello @bangbangg

The time it takes the initial responses to be delivered depends as much on factors outside the control of the application and the API e.g. If the items are already cached at the server, how many feeds are providing the service and how long it takes the service to fetch individual instruments. These factors are less predictable, particularly in a production environment. With stringent timing requirements the most effective way of ensuring a more predictable outcome would involve some form of pre-request/caching but I would also suggest examining the reasons for such a timing requirement. e.g. Snapshots might not be suitable for the use-case.

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.