Getting error "Failed to rsslElementEntry.encode() while encoding rssl elementlist"

AllRICs_3.txt

I am using Java EMA API and using batch to fetch data from Elektron. I get the following error, when RICs are sent using batch array,

Exception in thread "main" Exception Type='OmmInvalidUsageException', Text='Failed to rsslElementEntry.encode() while encoding rssl elementlist. Reason='INVALID_DATA'', Error Code='-29'

at com.thomsonreuters.ema.access.CollectionDataImpl.ommIUExcept(CollectionDataImpl.java:64)

at com.thomsonreuters.ema.access.ElementListImpl.encodedData(ElementListImpl.java:391)

at com.thomsonreuters.ema.access.MsgImpl.msgPayload(MsgImpl.java:835)

at com.thomsonreuters.ema.access.ReqMsgImpl.payload(ReqMsgImpl.java:649)

at EMAConsumer.Consumer.main(Consumer.java:520)


This error appears on execution of the following line,

consumer.registerClient(EmaFactory.createReqMsg().serviceName("ELEKTRON_DD").payload(batchView), appClient);


When I divided the RICs into multiple files, to check for the RIC which is creating this error. This error stopped coming. I am attaching here txt file of RIC codes which throws this error. Can anybody help me resolve this error? and what is the cause?

Thanks

Dhruv


Best Answer

  • umer.nalla
    umer.nalla LSEG
    Answer ✓

    Hi @dhruv.arora

    There is a 65535 byte limit on the size of the ElementList entry that is used when making the Batch request. - therefore you will need to split your request into multiple batches - each being less than 64KB. Depending on the average size of your RIC codes, this could be anywhere between 3k-6k RICs per batch.

    Personally I would just request each instrument individually - in a loop with some throttling/pacing of the request - e.g. send a thousand, pause a moment and send some more..NOTE - this is a personal choice as I don't like the added complication of ensuring each of my batches is less than 64KB


Answers

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.