Implementation guide · FIX and API Reliability
FIX Sequence Gaps: Resend and Gap-Fill Review
Review a missing FIX message using expected sequence numbers, resend requests, gap fills and duplicate checks without discarding unknown business events.
Published Updated
Published by FxTrusts, a supplier of brokerage and prop firm technology. Prepared with AI-assisted research and drafting; reviewed against the cited public sources. Examples are illustrative. Product links describe our services.
Quick answer
A FIX sequence gap means an inbound message number is higher than the next expected number. Recover according to the agreed session profile: request missing messages, process permitted retransmissions and gap fills, and preserve business-event reconciliation. Resetting sequence numbers is a different action and can conceal unresolved messages.

Capture the session boundary first
Record the peer identifiers, session profile, connection time, next expected inbound number and last persisted outbound number before intervening. A FIX session can survive a disconnected transport connection, so reconnecting does not inherently justify starting at one. Check whether a planned session reset or operating-day boundary actually occurred.
The FIX Session Layer standard describes ordered processing and recovery. Read the versioned June 2020 document with the current hub's listed errata and counterparty rules. A message log excerpt is insufficient if the sequence store was lost or two processes attempted to use one session identity.
Sources for this section
- FIX Session Layer — Technical Standardwww.fixtrading.org
- FIX Session Layer — current document hubfixtrading.org
Distinguish replay from skipping
A ResendRequest asks the sender to recover a range. Retransmitted messages carry the duplicate indicator so the receiver can determine what was already processed. A SequenceReset in gap-fill mode advances over a specified range under protocol rules. It is not evidence that the application has independently reconstructed every missing economic event.
The sender may have permitted reasons not to retransmit particular messages. Document the effect on your application and obtain authoritative order or execution state where required. Never label a gap resolved solely because the numeric sequence is continuous while an order remains unknown.
Test persistence and repeat recovery
A recovery test should restart the receiving process, not merely unplug and reconnect a socket. Confirm that sequence state and processed-event identities survive the restart. Then repeat the replay and verify that positions, trades and ledgers do not change a second time.
QuickFIX exposes distinct reset and persistence settings. Their names and defaults are implementation details, so review the actual configuration rather than copying a convenient reset option from an example. Keep a record of the message range, sender response, expected next number and any separate business reconciliation still open. A correct transport result can coexist with an unresolved operational case.
Sources for this section
- QuickFIX/C++ configurationquickfixengine.org
Example: one missing execution and one skipped message
In this synthetic trace, the receiver expects 101 but sees 103. It requests recovery from 101 under the agreed range convention. The sender replays application message 101 with the duplicate indicator, then sends a permitted gap fill at 102 advancing to 103. Message 103 is admitted only after the sequence is recovered. If message 101's economic event was already booked before a crash, its replay must not book again.
| Observation | Expected response |
|---|---|
| Expected 101, received 103 | Record gap; follow recovery rules |
| Replay 101 | Check processing history before business effects |
| Gap fill 102 → 103 | Advance only under agreed protocol semantics |
| Sequence continuous | Reconcile unresolved order/execution state separately |
Implementation checklist
- Save session identity, sequence store and relevant logs before changes.
- Verify the agreed resend range and gap-fill behavior.
- Test restart persistence and repeated replay.
- Track unknown economic events independently of numeric gap closure.
Sources
These documents support the reference. Check the original publication for current requirements and the limits of its scope.
- FIX Session Layer — Technical Standardwww.fixtrading.org
- FIX Session Layer — current document hubfixtrading.org
- QuickFIX/C++ configurationquickfixengine.org
Continue with the broader guides
Connect this reference to platform selection and the wider operating workflow.
