Using EMA, is there a mechanism for a market data consumer to identify if prices being published by providers are stale due to an issue faced by the provider or any other reason?
Using EMA, is there a mechanism for a market data consumer to identify if prices being published by providers are stale due to an issue faced by the provider or any other reason?
In addition to the answer already provided there are two additional points to note:
Lars
Addicticks
When a market data stream state changes e.g. suspect/stale due to the provider goes down. EMA consumer will receive status messages at the callback method named onStatusMsg(...).of OmmConsumerClient interface. The example source code implementing the onStatusMsg(..) in EMA Java Consumer application
public void onStatusMsg(StatusMsg statusMsg, OmmConsumerEvent event) { System.out.println("Item Name: " + (statusMsg.hasName() ? statusMsg.name() : "<not set>")); System.out.println("Service Name: " + (statusMsg.hasServiceName() ? statusMsg.serviceName() : "<not set>")); if (statusMsg.hasState()) System.out.println("Item State: " +statusMsg.state()); System.out.println(); }
The example output when the provider goes down, EMA application will receive a status message:
Item Name: IBM.N
Service Name: API_NEON_NI
Item State: Open / Suspect / None / 'A23: Service has gone down. Will recall when service becomes available.'