Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


In FIXEdge C++, users can enable this sequence numbers handing mechanism by setting the session parameter FixLayer.FixEngine.Session.Session_Name.HandleSeqNumAtLogon to true.

The sequence number is too low on Logon

FIX Engine will not accept the session if it detects that a counterparty connects with a sequence lower than expected and ResetSeqNumFlag (141) is not set.This behavior is recommended by the FIX Standard as a serious problem. For example, it identifies the issue that messages on both sides are inconsistent and this may lead to financial losses.


For manual requests, the user should compose the Resend Request (2) message with tags specifying the range for requested messages with tags BeginSeqNo (7) and EndSeqNo (16).

Requesting a single message

To request a single message: Both BeginSeqNo (7) and EndSeqNo (16) are set of the missing message.

Requesting a range of messages

To request a range of messages should be equal to the first message of range, should be equal to the last message of the range.

Requesting all messages from a specific sequence number


This approach is recommended to recover from out of sequence conditions as it allows for faster recovery in the presence of certain race conditions when both sides are simultaneously attempting to recover a gap.

Setting EndSeqNo(16) to 0 has been the recommended approach since FIX.4.2.

Negative case: Resend request with a correct BeginSeqNo and wrong EndSeqNo

In cases when the counterparty sends EndSeqNo (16) greater than the current counter of outgoing sequence numbers, FIX Antenna sends all messages from BeginSeqNo (7) to the last known message with the current outgoing sequence number.


For example, there is a request is for 1-100 but FIX Engine has only 10 messages so FIX Engine will send messages with sequence from 1 to 10.

Negative case: Resend request with a wrong BeginSeqNo

In cases when the counterparty sends invalid or greater than expected BeginSeqNo (7), the FIX Engine treats it as unexpected and sends back a reject message.



out: 8=FIX.4.4|9=80|35=2|49=TEST001|56=FIXEDGE|34=97|52=20210809-14:28:55.787|7=2147483648|16=10000|10=017|
in: 8=FIX.4.4|9=108|35=3|49=FIXEDGE|56=TEST001|34=78|52=20210809-14:28:52.813|45=97|58=Invalid Resend Request: BeginSeqNo <= 0.|10=106|

QuickFIX Behavior

  • If BeginSeqNo is greater than expected, QuickFIX doesn’t reject it but sends a Sequence Reset (4) message with NewSeqNo(36) equal to the next expected sequence number expected by the counterparty and doesn’t resend messages. 
  • If BeginSeqNo is greater than int32, then QuickFIX treats it as a negative integer (-2147483648), sends Sequence Reset message with 34=-2147483648 and 36=2, and then resends all messages.

Modify Sequence Numbers Manually

FIX Antenna C++

Sequences can be modified via API methods Session::InSeqNum and Session::OutSeqNum


The way to modify sequences is described here: FIXEdge Java Administration

Limiting the number of messages in the resend request response from FIXEdge


This option is available starting with FIXEdge version 6.3.0.


If the option is not disabled, FIXEdge will ignore the duplicates of resend requests.

Performance optimizations with the ResendMessagesBlockSize parameter

FIX Engine allows fine-tuning performance by splitting one big resend request in to multiple batches of ResendMessagesBlockSize messages. The best value can be found experimentally. The blocks should be fit in a single MFU.