We currently develop the NI Provider application that publishes quotes with the MMT_MARKET_PRICE domain.
The problem is after the provider restarts and sends refresh messages, the consumer is not able to update item values. We tried to keep the same handle value for the item between restarts and change it - doesn't help.
We cannot change the consumer logic. In OMMViewer we also observe items disappear after provider restarts and we have to open a new subscription. So the question is if there's something wrong with our provider logic? Can we change it somehow to get rid of consumer restart? Is it necessary to have the same handle value in refresh messages for the same item in different provider sessions?
Below is the source code of the provider (in kotlin):
val refreshMsg = EmaFactory.createRefreshMsg() refreshMsg.serviceName(serviceName).name("FIAT_" + trepQuoteDTO.isin) refreshMsg.domainType(MMT_MARKET_PRICE) refreshMsg.state( OmmState.StreamState.OPEN, OmmState.DataState.OK, OmmState.StatusCode.NONE, "UnSolicited Refresh Completed") val fieldList = EmaFactory.createFieldList() fieldList.add(EmaFactory.createFieldEntry().ascii(831, serviceName)) fieldList.add(EmaFactory.createFieldEntry().real(BID, trepQuoteDTO.bid, OmmReal.MagnitudeType.EXPONENT_NEG_2)) fieldList.add(EmaFactory.createFieldEntry().real(BID_SIZE, trepQuoteDTO.bidSize, OmmReal.MagnitudeType.EXPONENT_0)) fieldList.add(EmaFactory.createFieldEntry().real(ASK, trepQuoteDTO.ask, OmmReal.MagnitudeType.EXPONENT_NEG_2)) fieldList.add(EmaFactory.createFieldEntry().real(ASK_SIZE, trepQuoteDTO.askSize, OmmReal.MagnitudeType.EXPONENT_0)) refreshMsg.payload(fieldList).complete(true) val handleId: Long = itemHandlers.getOrPut(trepQuoteDTO.isin, { counter.getAndIncrement() }) provider.submit(refreshMsg, handleId)