FIX 4.2 Gap Fill

Imported from previous forum

Hi

I have a question with regards to FIX 4.2 gap fill messages.

Lets say A has lost messages 5 to 10, sent by B.

It sends a resend request asking for messages 5 to 10.

B then sends a gap fill message.

What should the MsgSeqNum of the gap fill sent by B be? Should it be 5 or 6?

As far as I understand it should be 5, the next message sequence number expected by A.

Does this differ between 4.2 and 4.3?

Thanx
Harry

[ original email was from Ryan Pierce - rpierce@taltrade.com ]
> I have a question with regards to FIX 4.2 gap fill messages.
>
> Lets say A has lost messages 5 to 10, sent by B.
>
> It sends a resend request asking for messages 5 to 10.
>
> B then sends a gap fill message.
>
> What should the MsgSeqNum of the gap fill sent by B be? Should it be 5 or 6?
>
> As far as I understand it should be 5, the next message sequence number expected by A.
>
> Does this differ between 4.2 and 4.3?

If you receive a Resend Request from 5 to 10, and 5 to 10 are all admin messages (or business messages you don’t want to re-transmit, like new orders), then send 5 Poss Dupe SeqReset-Gap Fill with the new sequence number of 11.

Notes:

The new sequence number is generally one greater than the range requested. Gap filling over more than the client asks for can lead to problems.

If you’ve only sent admins for 5, 6, and 7, and the client is asking for 5-10, then set the new sequence number to 8. (One more than the highest message in the range.)

It generally is better (and much simpler to code) if, upon noticing a gap, you throw out all messages after the gap (with the exception of the ones the FIX spec requires be processed out of sequence!) and ask for a Resend Request from the start of the gap to infinity (999999 in FIX 4.0-4.1, 0 in 4.2 and above.) This reduces the time both parties spend thrashing around.

Other than the difference noted above, all of this is the same for FIX 4.0-4.3.

Ryan