OnixS C++ SGX Titan ITCH Market Data Handler  1.2.2
API documentation
Affecting Packet Gap Detection

Detecting Packet Gaps

Due to unreliable nature of multicast, packets transmitted by MDP may be received in the order different to the original. To differ the case when Handler received out-of-order packets from the case when some of packets were completely lost, Handler uses two parameters OnixS::SgxTitan::MarketData::Itch::HandlerSettings::outOfOrderPacketMaxInterval and OnixS::SgxTitan::MarketData::Itch::HandlerSettings::lostPacketWaitTime.

When out-of-order packet is received, 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 certain threshold.

OnixS::SgxTitan::MarketData::Itch::HandlerSettings::outOfOrderPacketMaxInterval parameter defines size of interval for incoming packets starting from the last received. Packet is considered as out-of-order if its sequence number fits into following interval:

[seqNumberOfLastReceivedPacket, seqNumberOfLastReceivedPacket+outOfOrderPacketsMaxInterval],

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

If for a certain time interval Handler receives missing data, Handler resumes normal data processing. However, if no data is received for predefined time frame, Handler considers missing data as lost and raises packet gap event. OnixS::SgxTitan::MarketData::Itch::lostPacketWaitTime parameter defines size of time interval Handler waits for missing data.