The Handler listens to market data on different sources while performing market data processing.
To provide users with more flexibility and to implement their trading strategies as well as testing suites more effectively, the SDK exposes an additional listening interface, the OnixS::CME::MDH::ChannelFeedListener class, to get notified on various aspects related with multicast and TCP feeds.
The Handler's parameter allowing to subscribe to the given set of events is accessible via the
The following table depicts which of listeners' members are invoked by the OnixS::CME::MDH::Handler class instance and under which circumstances.
|OnixS::CME::MDH::ChannelFeedListener::onFeedConnected||Invoked when the Handler starts listening to market data on the feed passed to a callback as a parameter and already established connection with a remote source or joined multicast group in case of a multicast source.|
|OnixS::CME::MDH::ChannelFeedListener::onFeedDisconnected||Invoked when the Handler accomplished listening to market data on the feed and already disconnected from a remote source or unjoined a multicast group.|
Invoked when a packet is received on the given feed.
Each callback of the OnixS::CME::MDH::ChannelFeedListener supplies information about a source of data which is encapsulated into the OnixS::CME::MDH::NetFeed class. The given class allows to identify various attributes of a feed like type (instrument, snapshot, incremental), role (A, B), unique identifier, etc.
The OnixS::CME::MDH::ChannelFeedListener::onFeedPacket callback is invoked each time data is received on a feed, no matter whether that data is outdated or duplicates the already received one. An instance of the OnixS::CME::MDH::PacketArgs allows to access received data via OnixS::CME::MDH::PacketArgs::packet member and obtain information on a souce of data using the OnixS::CME::MDH::PacketArgs::source member. It's possible to implement various tracing facilities to determine duplicates, gaps in data for a particular feed or all feeds of a particular type having the details on received packet (primarily sequence number) and its origin. The OnixS::CME::MDH::PacketArgs::receiveTime attribute helps to identify delays in receiving data for a particular feed. The whole analysis usually helps in tracing network issues on an application level.