Potential deadlock with OmmConsumer

charanya
charanya Newcomer

We are creating an EMA consumer, and then opening item streams (100 items batched in each ReqMsg) with the consumer. We simply stop seeing new messages a few minutes after the consumer is established, without any exceptions or errors. This happens while the loop of opening item streams is ongoing. Debugging shows that there is potentially a deadlock situation occurring, as illustrated by the stack traces below. Is there some kind of rate/limit as to how batched requests should be created (we have a single Machine ID and hence a single EMA consumer). Version used is 3.6.7.1, running Kotlin. The core code used to batch requests is below


private suspend fun requestBatchRics(rics: List<String>) {
rics.chunked(100).forEach {
val ricArray = EmaFactory.createOmmArray().apply {
it.forEach { ric -> add(EmaFactory.createOmmArrayEntry().ascii(ric)) }
}

val batchList = EmaFactory.createElementList().apply {
add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_BATCH_ITEM_LIST, ricArray))
if (REQUEST_SUBSET_MARKET_DATA_FIELDS) {
val viewDataArray = EmaFactory.createOmmArray().apply {
FIELD_IDS.values.forEach { fieldValue ->
add(EmaFactory.createOmmArrayEntry().intValue(fieldValue))
}
}

add(EmaFactory.createElementEntry().uintValue(EmaRdm.ENAME_VIEW_TYPE, 1))
add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_VIEW_DATA, viewDataArray))
}
}

EmaFactory.createReqMsg()

val requestMessage = EmaFactory
.createReqMsg()
.serviceName(service)
.payload(batchList)

consumer.registerClient(reqMsg, this)
}


1667882413559.png

Best Answer

Answers