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::ConflatedUDP::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 handler.settings().listeners().feeds()
path.
The following table depicts which of listeners' members are invoked by the OnixS::CME::ConflatedUDP::Handler class instance and under which circumstances.
Event | Description |
---|---|
OnixS::CME::ConflatedUDP::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::ConflatedUDP::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. |
OnixS::CME::ConflatedUDP::ChannelFeedListener::onFeedPacket | Invoked when a packet is received on the given feed.
|
Each callback of the OnixS::CME::ConflatedUDP::ChannelFeedListener supplies information about a source of data which is encapsulated into the OnixS::CME::ConflatedUDP::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::ConflatedUDP::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::ConflatedUDP::PacketArgs allows to access received data via OnixS::CME::ConflatedUDP::PacketArgs::packet member and obtain information on a souce of data using the OnixS::CME::ConflatedUDP::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::ConflatedUDP::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.