Resends

Imported from previous forum

[ original email was from Danny Shobrook - dzshobrook@dial.pipex.com ]
This is a theoretical situation but I was just wondering what happens if a gap fill occurs around the time the msg sequence number wraps round.

Eg

message 9998 is received but 9999 and 1 go walkies. Message 2 is received. Do you send a resend with startno as 9999 and endno 1? Should you shut the connection down as 2 is less than the 9999 you are expecting?

Is there a good way of handling this?

As far as I can understand, the sequence numbers do not wrap. One has to explicitly reset sequence numbers, by sending a new logon with ResetSeqNumFlag (141) set (FIX.4.1). This has to be done quite a bit before max is reached to allow for TestRequests, heartbeats and/or resends.

Hmm, how about piggy-back some acks in FIX.5.0?

Ulf Eriksson
Interbizz Financial Systems

> This is a theoretical situation but I was just wondering what happens if a gap fill occurs around the time the msg sequence number wraps round.
>
> Eg
>
> message 9998 is received but 9999 and 1 go walkies. Message 2 is received. Do you send a resend with startno as 9999 and endno 1? Should you shut the connection down as 2 is less than the 9999 you are expecting?
>
> Is there a good way of handling this?
>

Sequence numbers do not wrap. New sequence numbers starting at 1 are used to begin a new FIX Session (a trading day, not reconnects within a trading day) either via mutual agreement as to start and stop times and/or the use of the ResetSeqNumFlag feature in FIX 4.1 within a continuous 24 hour session.

The "9999" reference related to seq numbers was in FIX 3.0 and below. FIX 4.0 and 4.1 refer to "99999". The primary reason for its use was to provide an infinity value for the ResendRequest. Future versions will likely refer to EndSeqNo of -1 and eliminate specifying a "max" seq num.

>
> As far as I can understand, the sequence numbers do not wrap. One has to explicitly reset sequence numbers, by sending a new logon with ResetSeqNumFlag (141) set (FIX.4.1). This has to be done quite a bit before max is reached to allow for TestRequests, heartbeats and/or resends.
>
> Hmm, how about piggy-back some acks in FIX.5.0?
>
> Ulf Eriksson
> Interbizz Financial Systems
>
> > This is a theoretical situation but I was just wondering what happens if a gap fill occurs around the time the msg sequence number wraps round.
> >
> > Eg
> >
> > message 9998 is received but 9999 and 1 go walkies. Message 2 is received. Do you send a resend with startno as 9999 and endno 1? Should you shut the connection down as 2 is less than the 9999 you are expecting?
> >
> > Is there a good way of handling this?
> >
>

Correction to my posting:
FIX 3.0 and below refer to 99999
FIX 4.0 and above refer to 999999

I knew it was ten times greater, just used the wrong base. oops…

> Sequence numbers do not wrap. New sequence numbers starting at 1 are used to begin a new FIX Session (a trading day, not reconnects within a trading day) either via mutual agreement as to start and stop times and/or the use of the ResetSeqNumFlag feature in FIX 4.1 within a continuous 24 hour session.
>
> The "9999" reference related to seq numbers was in FIX 3.0 and below. FIX 4.0 and 4.1 refer to "99999". The primary reason for its use was to provide an infinity value for the ResendRequest. Future versions will likely refer to EndSeqNo of -1 and eliminate specifying a "max" seq num.
>
>
> >
> > As far as I can understand, the sequence numbers do not wrap. One has to explicitly reset sequence numbers, by sending a new logon with ResetSeqNumFlag (141) set (FIX.4.1). This has to be done quite a bit before max is reached to allow for TestRequests, heartbeats and/or resends.
> >
> > Hmm, how about piggy-back some acks in FIX.5.0?
> >
> > Ulf Eriksson
> > Interbizz Financial Systems
> >
> > > This is a theoretical situation but I was just wondering what happens if a gap fill occurs around the time the msg sequence number wraps round.
> > >
> > > Eg
> > >
> > > message 9998 is received but 9999 and 1 go walkies. Message 2 is received. Do you send a resend with startno as 9999 and endno 1? Should you shut the connection down as 2 is less than the 9999 you are expecting?
> > >
> > > Is there a good way of handling this?
> > >
> >
>

[ original email was from Danny Shobrook - dzshobrook@dial.pipex.com ]
It has been a while since I actually had a flick through the spec. You are right nothing about wrap rounds. I was just going over the documentation for our product and saw 999999 as the maximum number in a resend event and assumed we must wrap round.