FIX Gap Fill Issue – Sequence Number Gaps Explained
A sequence gap occurs when MsgSeqNum values are not consecutive. For example, receiving sequence 1, 2, 4, 5 indicates message 3 was lost. FIX protocol provides ResendRequest (35=2) to recover missing messages.
Root Cause
1) Network packet loss, 2) Application crash without persisting sequence numbers, 3) Message sent but not acknowledged, 4) Sequence number reset not synchronized, 5) Out-of-order message delivery.
Broker/Exchange Action
Upon receiving ResendRequest, broker resends missing messages or sends SequenceReset (35=4) if gap fill is not possible. Broker may also initiate gap fill proactively.
Client/Your Action
1) Detect gaps by tracking expected vs received sequence numbers, 2) Send ResendRequest with BeginSeqNo and EndSeqNo, 3) Persist sequence numbers to disk, 4) Recover sequence on application restart, 5) Handle SequenceReset messages properly.
Example FIX Message
How FIX Doctor Detects This
FIX Doctor analyzes MsgSeqNum (34) values across all messages and flags any gaps. The timeline shows sequence numbers, and gaps are highlighted in the error summary.
Related Errors
Analyze Your FIX Logs
Upload or paste your FIX logs to automatically detect this error and get detailed diagnostics.
Analyze FIX Logs