OnixS C++ B3 Binary UMDF Market Data Handler  1.3.0
API documentation
Affecting Packet Gap Detection

Detecting Packet Gaps

Due to the unreliable nature of multicast, the packets transmitted by the exchange 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::B3::MarketData::UMDF::HandlerSettings::outOfOrderPacketMaxInterval and OnixS::B3::MarketData::UMDF::HandlerSettings::lostPacketWaitTime.

When an out-of-order packet is received, the Handler decides on the 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::B3::MarketData::UMDF::HandlerSettings::outOfOrderPacketMaxInterval parameter defines the size of the interval for incoming packets starting from the last received. The packet is considered 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 particular 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::B3::MarketData::UMDF::HandlerSettings::lostPacketWaitTime parameter defines the size of the time interval the Handler waits for missing data.