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'