FIX Protocol Tag 34: MsgSeqNum
Message sequence number. Each side numbers the messages it sends, starting at 1 for a new session; a gap tells the receiver that messages are missing and triggers a Resend Request.
- Tag number
- 34
- Data type
- SEQNUM
- FIX versions
- FIX 4.0 to 5.0 SP2 and FIXT 1.1
- Location
- Standard header
Practical notes on MsgSeqNum
MsgSeqNum is the sequence number of the message within the session, counted separately in each direction, starting at 1.
- Every message increments it, administrative messages included. Heartbeats and Rejects use numbers too.
- Each side tracks the next number it will send and the next number it expects. They are independent: your outbound 5000 says nothing about the counterparty's outbound numbers.
- A replayed message keeps its original number and carries PossDupFlag (43) = Y.
- Numbers return to 1 when both sides reset, usually at an agreed daily or weekly time, or through ResetSeqNumFlag (141) on the Logon.
Common mistakes
- A number lower than expected without PossDupFlag ends the session with "MsgSeqNum too low".
- A number higher than expected starts a ResendRequest; it is not an error by itself.
- Lowering the expected inbound number by hand can make you process messages twice.
See also:MsgSeqNum too lowMsgSeqNum too highFIX session layer explained
Tag 34 in each FIX version
Values and message usage as defined in a specific version.
Data type
SEQNUM: A positive integer message sequence number.
Example
34=215
Illustrative value. In a message, fields are separated by the SOH character (0x01), often shown as | or ^ in logs.
Decode a message with this tagMessage types that use tag 34
MsgSeqNum belongs to the standard message header, which every FIX message carries, so it is not listed against individual message types.
Field and message data comes from the QuickFIX data dictionaries for FIX 4.0 to 5.0 SP2 and FIXT 1.1, used under the QuickFIX Software License. This product includes software developed by quickfixengine.org (http://www.quickfixengine.org/). Enumerated value names are converted to plain text for reading.