FIX: Client asked for GapFill but I want to send a

2019-07-03 06:10发布

问题:

So my client is requesting a GapFill because our sequences are off. Instead of replaying the messages I want to send a SequenceReset instead. My question is simple: What should be the message sequence of this SequenceReset I am about to send to him? I don't want my client to drop it because it does not recognize the message sequence in my SequenceReset, or detect a gap and ask for another GapFill which would put me on an infinite loop.

Should I send my SequenceReset with the sequence of the first message the client asked for a replay?

Are session messages resent during a GapFill?

Does a client drop session messages if their sequence is off? (I would think so).

So to summarize, my question is:

What sequence should I use on a SequenceReset after a GapFill from the client so that my client actually is able to process my SequenceReset and keep going?

回答1:

There are two types of SequenceReset:

1. With GapFillFlag = 'Y'

2. With GapFillFlag = 'N'

For 1. the receiving party should IGNORE the MsgSeq in the message and just process it.

For 2. the sending party must make MsgSeq equal to BeginSeq so the receiving party will not ask for a GapFill again as you described.

From the Fix Spec:

If the GapFillFlag field is present (and equal to Y), the MsgSeqNum should conform to standard message sequencing rules (i.e. the MsgSeqNum of the Sequence Reset-GapFill message should represent the beginning MsgSeqNum in the GapFill range because the remote side is expecting that next message).