EMA Java - consumer not getting paused for individual item

I am using EMA 3.8.0.0. I am trying to pause my consumer for individual RIC's in a batch request but still I receive all prices.

I am using Docker simulator environment in my local to simulate prices to consume.

public void onUpdateMsg(UpdateMsg updateMsg, OmmConsumerEvent event) {
      
                consumer.reissue(EmaFactory.createReqMsg().domainType(EmaRdm.MMT_MARKET_PRICE)
                        .initialImage(false).pause(true).name(updateMsg.name()), event.handle());
}


Best Answer

  • Gurpreet
    Answer ✓

    Hi @parul.s.sharma,

    You are trying to call reissue with the batch request handle. The reissue should be called with an item handle instead. To get item handles in a batch request call the getHandle() function in the onRefreshMsg callback.

    The batch reissue functionality is not supported by the EMA SDK.

Answers

  • Hello @parul.s.sharma

    It is an expected Batch request behavior. Once the server receives a Batch request message from the API, the server will response with a status message that it accepts that Batch request and will close that request steam.

    Item Name: <not set>
    Service Name: ELEKTRON_DD
    Item State: Closed / Ok / None / 'Stream closed for batch'

    Then the server is going to create individual streams of each RIC and send data back to the API.

    That is why you need to get the item handle via the onRefreshMsg() callback method as suggested by my colleague.