question

Upvotes
Accepted
22 2 2 6

How to detect closing run events?

How can the closing run events be detected? I am working on upgrading from rfa to ema and my application has some existing logic that executes on a closing run event. In rfa, I was able to detect closing run events by checking the MarketDataItemEvent.MarketDataMessageType (CLOSING_RUN)but I can't seem to find an equivalent for ema.

elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-api
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.

1 Answer

· Write an Answer
Upvote
Accepted
9.6k 10 7 7

Hello @CAM

In EMA Java, Closing run is defined as one type of UpdateTypeNum component in an Market Price Update Message shown in EMAJ_RDMUsageGuide.pdf below:

EMA Java provides com.thomsonreuters.ema.access.UpdateMsg.updateTypeNum() method to get UpdateTypeNum component as explained in EMA Java document of UpdateMsg class:

Hence, you can use the method to check if a message received in onUpdateMsg(..) is closing run event or not. The snipped example application source code is shown below:

public void onUpdateMsg(UpdateMsg updateMsg, OmmConsumerEvent event) 
{
   …
  int updateTypeNum = updateMsg.updateTypeNum();	 
  if(updateTypeNum==com.thomsonreuters.ema.rdm.EmaRdm.INSTRUMENT_UPDATE_CLOSING_RUN)
   {
	//process closing run event
	…
   }
   …
}

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.