Decreasing sequence numbers

Imported from previous forum

[ original email was from John Cameron - jc@cameronsystems.com ]
I think there is an inconsistency in the Fix spec relating to the handling of decreasing sequence numbers.

In the Session Protocol section of the spec, the following general rule is given:

"NOTE: In ALL cases except the Sequence Reset - Reset message, the FIX session should be terminated if the incoming sequence number is less than expected and the PossDupFlag is not set."

However, earlier in the same section describing the use of Logon with the ResetSeqNumFlag, it recommends that the Logon is sent with MsgSeqNum = 1. Clearly, in this case, a Logon message can also be sent with a decreasing sequence number.
Quoting again:

"…Once the Heartbeat has been received, the initiator should send a Logon with ResetSeqNumFlag set to Y and with MsgSeqNum of 1. The acceptor should respond with a Logon with ResetSeqNumFlag set to Y and with MsgSeqNum of 1."

Have I got this wrong? If not, the spec should be amended to list both exceptions to the general rule of no decreasing seq nums.

[ original email was from Hank Terrebrood - Hank.Terrebrood@csfb.com ]
John, you are working too hard. Your quote answered your question.

In ALL cases except the sequence rest - you then go on to describe the sequence reset process as an exception.

Happy New Year!

By the way…anyone notice that the Advertised Trade, E-Mail & News, sections are detailed in the Pre-Trade volume! Tisk Tisk

Hey, and why can’t this site sort the questions in decending order so that the most recent questions are at the top???

"Jane, stop this crazy thing!"

> I think there is an inconsistency in the Fix spec relating to the handling of decreasing sequence numbers.
>
> In the Session Protocol section of the spec, the following general rule is given:
>
> "NOTE: In ALL cases except the Sequence Reset - Reset message, the FIX session should be terminated if the incoming sequence number is less than expected and the PossDupFlag is not set."
>
> However, earlier in the same section describing the use of Logon with the ResetSeqNumFlag, it recommends that the Logon is sent with MsgSeqNum = 1. Clearly, in this case, a Logon message can also be sent with a decreasing sequence number.
> Quoting again:
>
> "…Once the Heartbeat has been received, the initiator should send a Logon with ResetSeqNumFlag set to Y and with MsgSeqNum of 1. The acceptor should respond with a Logon with ResetSeqNumFlag set to Y and with MsgSeqNum of 1."
>
> Have I got this wrong? If not, the spec should be amended to list both exceptions to the general rule of no decreasing seq nums.
>

[ original email was from John Cameron - jc@cameronsystems.com ]
> John, you are working too hard. Your quote
> answered your question.

Well, one of us is.

My point is that there are two message types that in certain cases can have decreasing sequence numbers: not just one. Both exceptions to the general rule should be stated.

So my question stands.

By the way, the Sequence Reset - Reset message cannot perform the same function as Logon with ResetSeqNumFlag set. Sequence Reset - Reset can only be used to increase the sequence number.

[ original email was from Hank Terrebrood - Hank.Terrebrood@csfb.com ]
I see the point.

The spec defines the Sequence Reset in such a way so that it has three functions. Reset for gap fill Y or N and Reset-Reset. Reset-Reset must be processed without regard to the message sequence number. Meaning that it can, under adverse conditions, reset the sequence number to any value.

> > John, you are working too hard. Your quote
> > answered your question.
>
> Well, one of us is.
>
> My point is that there are two message types that in certain cases can have decreasing sequence numbers: not just one. Both exceptions to the general rule should be stated.
>
> So my question stands.
>
> By the way, the Sequence Reset - Reset message cannot perform the same function as Logon with ResetSeqNumFlag set. Sequence Reset - Reset can only be used to increase the sequence number.
>
>

[ original email was from John Cameron - jc@cameronsystems.com ]
The Sequence Reset message does have variations depending on how the gap fill flag is set. However, I was also talking about the Logon message which has a special field, the ResetSeqNumFlag, which can make it behave differently.

I believe that the relevant line in the spec should be changed to read something like:

"NOTE: In ALL cases except the Sequence Reset - Reset message and the Logon message with ResetSeqNumFlag set, the FIX session should be terminated if the incoming sequence number is less than expected and the PossDupFlag is not set. …"

That’s all I am suggesting. Sorry if I did not explain myself clearly.

> I see the point.
>
> The spec defines the Sequence Reset in such a way so that it has three functions. Reset for gap fill Y or N and Reset-Reset. Reset-Reset must be processed without regard to the message sequence number. Meaning that it can, under adverse conditions, reset the sequence number to any value.
>
> > > John, you are working too hard. Your quote
> > > answered your question.
> >
> > Well, one of us is.
> >
> > My point is that there are two message types that in certain cases can have decreasing sequence numbers: not just one. Both exceptions to the general rule should be stated.
> >
> > So my question stands.
> >
> > By the way, the Sequence Reset - Reset message cannot perform the same function as Logon with ResetSeqNumFlag set. Sequence Reset - Reset can only be used to increase the sequence number.
> >
> >
>

I agree that Logon with ResetSeqNumFlag=Y should be listed as one of the exceptions in that statenent. I’ve noted it for a future Errata to the spec. Thanks.

> The Sequence Reset message does have variations depending on how the gap fill flag is set. However, I was also talking about the Logon message which has a special field, the ResetSeqNumFlag, which can make it behave differently.
>
> I believe that the relevant line in the spec should be changed to read something like:
>
> “NOTE: In ALL cases except the Sequence Reset - Reset message and the Logon message with ResetSeqNumFlag set, the FIX session should be terminated if the incoming sequence number is less than expected and the PossDupFlag is not set. …”
>
> That’s all I am suggesting. Sorry if I did not explain myself clearly.
>
> > I see the point.
> >
> > The spec defines the Sequence Reset in such a way so that it has three functions. Reset for gap fill Y or N and Reset-Reset. Reset-Reset must be processed without regard to the message sequence number. Meaning that it can, under adverse conditions, reset the sequence number to any value.
> >
> > > > John, you are working too hard. Your quote
> > > > answered your question.
> > >
> > > Well, one of us is.
> > >
> > > My point is that there are two message types that in certain cases can have decreasing sequence numbers: not just one. Both exceptions to the general rule should be stated.
> > >
> > > So my question stands.
> > >
> > > By the way, the Sequence Reset - Reset message cannot perform the same function as Logon with ResetSeqNumFlag set. Sequence Reset - Reset can only be used to increase the sequence number.
> > >
> > >
> >
>