OnixS C++ CME MDP Conflated UDP Handler  1.1.2
API documentation
Listening for Activity on the Feeds

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.

Warning
Previously, the name of the class reflecting feed-related events was OnixS::CME::ConflatedUDP::FeedListener. However, due to improvements into the Feed Engine Concept, the listener class was renamed to OnixS::CME::ConflatedUDP::ChannelFeedListener to reflect the purpose of the listener more precisely. The callbacks signatures and invocation cases remains untouched.

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.

Note
An important aspect of the given member is the fact that it is invoked for each packet received by the feed. That means duplicated and out-of-order packets are passed through this callback as well as sequenced packets. Also, the given member is invoked immediately when a packet is received and timestamped using a watch service provided by a Feed Engine instance managing the feed for which the packet was received. Therefore, callback invocation differs from similar members of the OnixS::CME::ConflatedUDP::MarketDataListener, which are invoked only when data passes processing session rules and is scheduled for actual processing.

Feed Identification

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.

Implementing Feed Tracing

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.