For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
11 1 0 2

Unable to subscribe 9k rics in single shot

Hi Team,

I am getting below error when I am trying to subscribe 9K TE rics. What are the max number of RICS that I can subscribe at single time?

Query Type: Technical
Operating System: Windows
Compiler: Java & 11
Product Load: EMA Version 3.6.6.0

 2022-12-09 10:19:22.521 ERROR 7 --- [           main] c.refinitiv.reps.ema.consumer.Consumer   : Failed to rsslElementEntry.encode() while encoding rssl elementlist. Reason='INVALID_DATA'2022-12-09 10:19:22.523  WARN 7 --- [           main] c.refinitiv.ema.access.OmmConsumerImpl   : loggerMsg    ClientName: ChannelDictionary    Severity: Warning    Text:    RDMDictionary stream was closed with status message        streamId 3        Reason State: Closed/Suspect/None - text: "Login stream was closed."
loggerMsgEnd

2022-12-09 10:19:22.523  WARN 7 --- [           main] c.refinitiv.ema.access.OmmConsumerImpl   : loggerMsg    ClientName: ChannelDictionary    Severity: Warning    Text:    RDMDictionary stream was closed with status message        streamId 4        Reason State: Closed/Suspect/None - text: "Login stream was closed."
elektron-message-api
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
Accepted
32.2k 40 11 19

Hello @Maha Rana Parthap Sing ,

The first step I would suggest is to check if the size of the watchlist that is assigned to the user and if it is exceeded by this request.

If the max watchlist assigned is 9k or higher, for EMA subscription, I would suggest splitting request into batches of 2-3K, refer to EMA Java example 370 MP Batch within examples of RTSDK, for the details on requesting batches, and the full details can be found in EMA Developer Guide

Additionally, for mid-to-heavier subscription requirements, you may wish to increase output buffers from the default value, in EMA config, please see this previous discussion thread for more details.

if these two suggestions do not address the issue, the next step to look into is if the consumer is too slow to process the requests, a.k.a. "slow consumer".

It may be relevant to note, that if any of the required requests are for snapshot requests, rather than subscription requests that are continuous, then a snapshot request, once it is processed, does not count toward watchlist max requests anymore. And once a subscription request is unsubscribed, it stops being counted toward the max watchlist as well.

Hope that this information is of help

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
11 1 0 2

Hi @zoya faberov,

Thanks for the prompt response. I am using the batch ElementList, in single shot it supported 3K records for me. Now, I will split the 9K records into 3 batches (3K, 3K, 3K) and subscribe thrice by calling con.registerClient(parameters.....) 3 times. Could you please confirm if this is right approach to implement?

batch.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_BATCH_ITEM_LIST, array));
con.registerClient(EmaFactory.createReqMsg().serviceName(service).payload(batch), appC);
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
32.2k 40 11 19

Hi @Maha Rana Parthap Sing ,

Yes, this is it- just make sure that batch is new every time:

ElementList batch = EmaFactory.createElementList();
OmmArray array = EmaFactory.createOmmArray();

array.add(EmaFactory.createOmmArrayEntry().ascii("TRI.N"));
array.add(EmaFactory.createOmmArrayEntry().ascii("IBM.N"));

batch.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_BATCH_ITEM_LIST, array));

Is your infra connectivity RTO, or deployed RTDS, do you know what is your user watchlist size limit? If it's less then 9k, then the total subscription of 9k will not succeed despite the batch size partitioning.

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
11 1 0 2

Hi @zoya faberov,

Our Infra connectivity is via RTO. User watchlist size is unknown at this time, as per the requirement it grows or shrinks dynamically. I have to partition the rics dynamically.

For now, the given information on partitioning/batching is much helpful. Thanks @zoya faberov

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.