Sequence Reset
8=FIX.4.2
9=99
34=1031
35=4
36=1034
43=Y
49=DWFIX01
52=20160201-22:36:16.853
56=TEST1
122=20160201-22:36:16
123=Y
10=098
How is a Sequence Reset <4>
message used?
Sequence Reset <4>
message used?A Sequence Reset <4>
is used by the sending application to reset the incoming sequence number on the opposing side. The Sequence Reset <4>
consists of two (2) modes; Gap Fill and Gap Reset:
Mode 1: Gap Fill
Sequence Reset <4>-Gap Fill
when Y =GapFillFlag <123>
Mode 2: Gap Reset
Sequence Reset <4>-Rest
when N or Not Present =GapFillFlag <123>
Note: The Sequence Reset <4>-Reset
mode should ONLY be used to recover from a disaster situation which cannot be otherwise recovered via "Gap Fill" mode.
When can Sequence Reset <4>
message be used?
Sequence Reset <4>
message be used?The Sequence Reset <4>
message can be used in the following situations:
-
Scenario 1: During normal resend processing, the sending application may choose not to
send a message (e.g. an aged order). The Sequence Reset <4> - Gap Fill is used to mark the place of that message. -
Scenario 2: During normal resend processing, a number of administrative messages are
not resent, theSequence Reset <4> - Gap Fill
message is used to fill the sequence gap created.
In the event of an application failure, it may be necessary to force synchronization of sequence numbers on the sending and receiving sides via the use of Sequence Reset <4> - Reset
.
The sending application will initiate the sequence reset. The message in all situations specifies NewSeqNo <36>
to reset as the value of the next sequence number immediately following the messages and/or sequence numbers being skipped.
Missing the GapFillFlag <123>
message.
GapFillFlag <123>
message.If the GapFillFlag <123>
field is not present (or set to N), it can be assumed that the purpose of the Sequence Reset <4>
message is to recover from an out-of-sequence condition.
The MsgSeqNum <34>
in the header should be ignored (i.e. the receipt of a Sequence Reset <4> - Reset
message with an out of sequence MsgSeqNum <34>
should not generate resend requests).
The Sequence Reset <4> - Reset
should NOT be used as a normal response to a Resend Request <2>
(use Sequence Reset <4> - Gap Fill
).
The Sequence Reset <4> - Reset
should ONLY be used to recover from a disaster situation which cannot be recovered via the use of Sequence Reset <4> - Gap Fill
.
Note: The use of Sequence Reset <4> - Reset
may result in the possibility of lost messages.
Sequence Reset
The sequence reset can only increase the sequence number. If a sequence reset is received attempting to decrease the next expected sequence number, the message should be rejected and treated as a serious error.
Multiple ResendRequests
It is possible to have multiple ResendRequests issued in a row (i.e. 5
to 10
followed by 5
to 11
).
If sequence number 8
, 10
, and 11
represent application messages while the 5-7
and 9
represent administrative messages, the series of messages as result of the Resend Request <2>
may appear as the following:
SeqReset-GapFill
withNewSeqNo <36>
of8
- Message
8
SeqReset-GapFill
withNewSeqNo <36>
of10
- Message
10
This could then be followed by the following:
SeqReset-GapFill
withNewSeqNo <36>
of8
- Message
8
SeqReset-GapFill
withNewSeqNo <36>
of10
- Message
10
- Message
11
One must be careful to ignore the duplicate SeqReset-GapFill
which is attempting to lower the next expected sequence number. This can be detected by checking to see if its MsgSeqNum <34>
is less than expected. If so, the SeqReset-GapFill
is a duplicate and should be discarded.
Tag | Tag Description | Example Value | Value Description | Required |
---|---|---|---|---|
8 | BeginString | FIX.4.2 | FIX Version | Yes |
9 | BodyLength | 63 | Length of message | Yes |
34 | MsgSeqNum | 30 | Message sequence number | Yes |
35 | MsgType | 4 | Sequence Reset Message | Yes |
36 | NewSeqNo | 1034 | New sequence number | Yes |
43 | PossDupFlag | Y | Indicates possible retransmission of message with this sequence number. Y = Possible duplicate. | Yes |
49 | SenderCompID | DWFIX01 | Sender ID | Yes |
52 | SendingTime | 20160201-22:36:16.853 | Sending timestamp | Yes |
56 | TargetCompID | TEST1 | Target ID | Yes |
122 | OrigSendingTime | 20160201-22:36:16 | Original time of message transmission | Yes |
123 | GapFillFlag | Y | Indicates the message is replacing administrative or application messages which will not be resent. | Yes |
10 | CheckSum | 098 | Checksum of message | Yes |
Updated less than a minute ago