question

Upvotes
Accepted
22 3 3 7

What's the limit on Ema regMsg.payload(ElementList)?

What's the limit on regMsg.payload(ElementList)? Looks like is 3175. Am I doing this right?

import com.refinitiv.ema.access.ElementEntry;
import com.refinitiv.ema.access.ElementList;
import com.refinitiv.ema.access.EmaFactory;
import com.refinitiv.ema.access.OmmArray;
import com.refinitiv.ema.access.OmmConsumer;
import com.refinitiv.ema.access.OmmInvalidUsageException;
import com.refinitiv.ema.access.ReqMsg;
import com.refinitiv.ema.rdm.EmaRdm;
...
void testBatch(FluxSink<String> emitter, Set<String> symbolSet) {
for (int i = 0; i < symbolSet.size(); i++) {
ElementList batch = EmaFactory.createElementList();
OmmArray array = EmaFactory.createOmmArray();
for (String symbol : symbolSet) {
array.add(EmaFactory.createOmmArrayEntry().ascii(symbol));
if (array.size() > i)
break;
}

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

ReqMsg reqMsg = EmaFactory.createReqMsg();
try {
reqMsg = reqMsg.payload(batch);
} catch (OmmInvalidUsageException u) {
String s = "trep subscription error " + u.toString();
logger.error(s);
emitter.next(s);
emitter.complete();// subscription failed
}
emitter.next("success " + i);
}
}

The result I get here is

...
data:success 3173
data:success 3174
data:success 3175
data:trep subscription error Exception Type='OmmInvalidUsageException', Text='Failed to rsslElementEntry.encode() while encoding rssl elementlist. Reason='INVALID_DATA'', Error Code='-29'
#technologyema-apirequest-type
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.

@Patrick Sweeney

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

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

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS

1 Answer

· Write an Answer
Upvote
Accepted
22.1k 59 14 21

Hi @Patrick Sweeney,

The Element list can contain a maximum of 65535 bytes of data. So the actual number of instruments it contains will depend on the size of the identifier. This limit is described in the Section 11.3.2 of ElementList in this guide.


6. An element list currently has a maximum entry count of 65,535, where the first 255 entries may contain set-defined types. This type has an approximate maximum encoded length of 5 gigabytes but may be limited to 65,535 bytes if housed inside of a container entry. The content of element entry has a maximum encoded length of 65,535 bytes. These limitations can change in subsequent releases.
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.