question

Upvotes
1 0 0 1

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());
}


ema-api#productrefinitiv-real-time-optimisedbatch-request
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
23.6k 61 15 21

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
26.3k 61 17 14

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.