Discussion Forums

Re: Queueing incoming messages
John Prewett / Lava Trading
14 Aug 2007 9:46AM ET

Hi Eva,

Your question is a good one.

As you have noticed, there are two totally different strategies that can be used when receiving a high sequence number. The "send thru infinity" and the "fill the gap" methods are your two choices.

Each strategy has different merits.

The "fill the gap" strategy is network friendly as you don't request that various high sequenced messages that you have already received are retransmitted to you. Unfortunately, it is a significantly more complex problem. You must guarantee to store any high sequence messages while awaiting for a response to your resend request. This can become a technical challenge when sequence gaps occur in the responses to the resend request or other gaps in the messages you are receiving. Another challenge is where you might store these unprocessed high sequence messages as you could receive quite a few.

The "resend thru infinity" strategy is very simple. You discard all high sequence messages and simply wait for the correct sequence number. Unfortunately, all those high sequence messages you are discarding will have to be resent to you.

So the choice is a simple implementation ("resend thru infinity") versus network friendly ("fill the gap").

In my experience of "being assaulted" by FIX engines from many different vendors and customers, it is my preference that people use the simple "resend thru infinity" method. This gives rise to fewer problems. An incorrect implementation of the significantly more complex "fill the gap" method can leave the FIX session dead for the day when problems occur and an unrecoverable sequence number error occurs.

On whatever implementation you choose, ensure that your applications speaking FIX can have the sequence numbers reset while they are running. In this manner, a serious sequence number issue can be manually rectified and trading can continue, albeit with reconciliation required for any missing/unprocessed messages.

A common error when implementing the "resend thru infinity" method occurs when receiving multiple messages with a contiguous range of high sequence numbers in a burst. I have seen several FIX engines issue a resend request for each high sequenced message instead of just a single one. This is extremely network unfriendly. You should only issue one resend request per configurable time interval, which is reset upon receipt of the expected sequence number.

I hope this helps.

JohnP


Queueing incoming messages
Eva Schmidt   14 Aug 2007 9:27AM ET
Re: Queueing incoming messages
John Prewett / Lava Trading   14 Aug 2007 9:46AM ET
Re: Queueing incoming messages
Strat Efstratiou / Bear Stearns   14 Aug 2007 12:08PM ET
Re: Queueing incoming messages
Eva Schmidt   15 Aug 2007 3:26AM ET