MsgSeqNum (FIX sequence number)

term

networking

Kept in this browser · My desk

The number in MsgSeqNum(34) that each side of a FIX session assigns to every message it sends, in one series per direction, so the receiver can detect missing messages and ask for them again.

Both counters start at 1, are stored durably and are shared by session and application messages; resetting both to 1 starts a new session. Version 2.7 of 1994 already re-initialized sequence numbers each day, and FIX 4.0 made every message, administrative ones included, consume a number.

Detecting a gap. A message whose MsgSeqNum is greater than the expected NextNumIn reveals a gap; one lower than expected without PossDupFlag(43)=Y means broken state, and the session should end. Recovery. The receiver sends a ResendRequest (35=2) with BeginSeqNo(7) and EndSeqNo(16), 0 meaning all later messages. The sender retransmits with the original numbers, PossDupFlag=Y, a new SendingTime and the original time in OrigSendingTime(122); session messages are not resent but skipped with a SequenceReset (35=4) whose GapFillFlag(123)=Y and NewSeqNo(36) point past the gap, and stale application messages may be skipped the same way. A SequenceReset with GapFillFlag=N forces the counter and leaves the consequences with its sender. Resets. Continuous markets can reset in place with ResetSeqNumFlag(141) at an agreed time; allowing a reset at logon needs agreement, because the standard warns of order overfills. Not to be confused with PossResend(97), which an application sets on a message it resends under a new sequence number.

Also known as: msgseqnum, fix sequence number, resendrequest, resend request, sequencereset, gap fill, possdupflag, número de sequência fix

← Back to M Back to the glossary