OnixS C++ CME MDP Streamlined Market Data Handler  1.2.0
API Documentation
Affecting Packet Gap Detection

Detecting Packet Gaps

Due to unreliable nature of multicast, the packets transmitted by feeds may be received in the order different to the original. To differ the case when the Handler received out-of-order packets from the case when some of them were completely lost, the Handler uses two parameters OnixS::CME::Streamlined::MDH::RealtimeFeedSettings::outOfOrderPacketMaxInterval and OnixS::CME::Streamlined::MDH::RealtimeFeedSettings::lostPacketWaitTime.

Note
Noted parameters are a part of parameters for incremental feeds. An instance of OnixS::CME::Streamlined::MDH::RealtimeFeedSettings class can be accessed through the OnixS::CME::Streamlined::MDH::HandlerSettings::FeedSettings::incrementalFeeds member of the OnixS::CME::Streamlined::MDH::HandlerSettings::FeedSettings class, which instance in its turn is returned by the OnixS::CME::Streamlined::MDH::HandlerSettings::feeds member.

When an out-of-order packet is received, the Handler makes a decision on data loss if either missing data is not received for a predefined time interval, or if new incoming packets have sequence numbers greater than a certain threshold.

The OnixS::CME::Streamlined::MDH::RealtimeFeedSettings::outOfOrderPacketMaxInterval parameter defines the size of the interval for incoming packets starting from the last received. The packet is considered as out-of-order if its sequence number fits into the following interval:

[seqNumberOfLastReceivedPacket, seqNumberOfLastReceivedPacket+outOfOrderPacketsMaxInterval],

where seqNumberOfLastReceivedPacket - a sequence number of the last packet the Handler processed under normal conditions. In that case, the Handler waits for other packets to fulfill the incoming sequence. If a received packet has a sequence number greater than seqNumberOfLastReceivedPacket+outOfOrderPacketsMaxInterval, then the Handler decides on packets lost, and the gap is reported.

If for a certain time interval the Handler receives missing data, it resumes normal data processing. However, if no data is received for the predefined time frame, the Handler considers missing data as lost and raises a packet gap event. The OnixS::CME::Streamlined::MDH::RealtimeFeedSettings::lostPacketWaitTime parameter defines the size of time interval the Handler waits for missing data.