Search code examples
fix-protocol

What happens if a ResendRequest gets lost or the initiator is not able to answer it?


Consider the following sequence diagram which depicts the communication between a FIX initiator and the acceptor. Please note I am refering to FIX.4.4 here.

enter image description here

As you can see the message with sequence number 2 gets lost in transit. The initiator sends another message (with seq. number 3), the acceptor detects that gap and issues a resend request, asking again for message with seq. number 2 and everything that might have followed (7=2|16=0).

A couple of questions that I couldn't get answered by digging through the spec:

  • What happens if the "Resend Request" gets lost in transit?
  • What happens if the initiator is not able to resend the requested messages?

Solution

  • What happens if the "Resend Request" gets lost in transit?

    The gap will be detected on the subsequent message just as you lined out.

    However, the ResendRequest will not actually be resent because the only session-level message that must be resent is the Reject message. Instead, either a SequenceReset with 123/GapFillFlag=Y (description) will be sent or the message will be skipped with a SequenceReset message with 36/NewSeqNo set to a higher sequence number, effectively skipping the message that will not be resent.

    This is stated in the FIX spec in chapter "message recovery" (link)

    What happens if the initiator is not able to resend the requested messages?

    As stated above it should either send a GapFill instead, or skip to a higher sequence number.