MsgSeqNum after Logout

Imported from previous forum

Hi all,

What sequence number to use after a logout is successful? For example, if a client to a FIX server logs out successfully and then reattempts a login after 10 minutes (the same day), should the message sequence number be initialized to 1 agai? or the last sequence number received when the client was logged in should be incremented?

Regards,
Murad.

It could be negotiable between the client(Organization) and Server(Organization). Mostly if the client tries to re-connect on the same day, the server would expect the increment of the last sequence number. However the client can also negotiate with the server side to reset the sequence number.
Hope this Helps.

Vijay.

> Hi all,
>
> What sequence number to use after a logout is successful? For example, if a client to a FIX server logs out successfully and then reattempts a login after 10 minutes (the same day), should the message sequence number be initialized to 1 agai? or the last sequence number received when the client was logged in should be incremented?
>
> Regards,
> Murad.
>

[ original email was from Ian Orford - ian.orford@ubs.com ]
Remember, this is an important part of the FIX session’s recovery mechanism. After a comms failure, the ability to resend losst messages would be lost if we always reset to 1.

Note also that more recent versions of FIX have a mechanism to reset the sequence numbers as part of the login message. This is typically used as part of the end/start of day processing.

> It could be negotiable between the client(Organization) and Server(Organization). Mostly if the client tries to re-connect on the same day, the server would expect the increment of the last sequence number. However the client can also negotiate with the server side to reset the sequence number.
> Hope this Helps.
>
> Vijay.
>
>
> > Hi all,
> >
> > What sequence number to use after a logout is successful? For example, if a client to a FIX server logs out successfully and then reattempts a login after 10 minutes (the same day), should the message sequence number be initialized to 1 agai? or the last sequence number received when the client was logged in should be incremented?
> >
> > Regards,
> > Murad.
> >
>

Are we saying here that this is an implementation specific decision and is not specified by the FIX protocol up till now? Therefore, the client and server should negotiate and agree on something acceptable to both?

Regards,
Murad.

> Remember, this is an important part of the FIX session’s recovery mechanism. After a comms failure, the ability to resend losst messages would be lost if we always reset to 1.
>
> Note also that more recent versions of FIX have a mechanism to reset the sequence numbers as part of the login message. This is typically used as part of the end/start of day processing.
>
>
> > It could be negotiable between the client(Organization) and Server(Organization). Mostly if the client tries to re-connect on the same day, the server would expect the increment of the last sequence number. However the client can also negotiate with the server side to reset the sequence number.
> > Hope this Helps.
> >
> > Vijay.
> >
> >
> > > Hi all,
> > >
> > > What sequence number to use after a logout is successful? For example, if a client to a FIX server logs out successfully and then reattempts a login after 10 minutes (the same day), should the message sequence number be initialized to 1 agai? or the last sequence number received when the client was logged in should be incremented?
> > >
> > > Regards,
> > > Murad.
> > >
> >
>

–> Are we saying here that this is an implementation specific decision and is not specified by the FIX protocol up till now?

No. Murad, please review the "SESSION PROTOCOL" section within Volume 2 of the FIX Protocol specification. The first paragraph covers this.

> Are we saying here that this is an implementation specific decision and is not specified by the FIX protocol up till now? Therefore, the client and server should negotiate and agree on something acceptable to both?
>
> Regards,
> Murad.
>
> > Remember, this is an important part of the FIX session’s recovery mechanism. After a comms failure, the ability to resend losst messages would be lost if we always reset to 1.
> >
> > Note also that more recent versions of FIX have a mechanism to reset the sequence numbers as part of the login message. This is typically used as part of the end/start of day processing.
> >
> >
> > > It could be negotiable between the client(Organization) and Server(Organization). Mostly if the client tries to re-connect on the same day, the server would expect the increment of the last sequence number. However the client can also negotiate with the server side to reset the sequence number.
> > > Hope this Helps.
> > >
> > > Vijay.
> > >
> > >
> > > > Hi all,
> > > >
> > > > What sequence number to use after a logout is successful? For example, if a client to a FIX server logs out successfully and then reattempts a login after 10 minutes (the same day), should the message sequence number be initialized to 1 agai? or the last sequence number received when the client was logged in should be incremented?
> > > >
> > > > Regards,
> > > > Murad.
> > > >
> > >
> >
>

Got the answer:

After authentication, the initiator and acceptor must synchronize their messages through interrogation of the MsgSeqNum field. A comparison of the MsgSeqNum in the Logon message to the internally monitored next expected sequence number will indicate any message gaps.

Ref: Fix Protocol v4.1. Session Protocol - Logon. Page 10.

This indicates that the client should resume incrementing the sequence number which was last used in the previous session of the same day.

Regards,
Murad.

> Are we saying here that this is an implementation specific decision and is not specified by the FIX protocol up till now? Therefore, the client and server should negotiate and agree on something acceptable to both?
>
> Regards,
> Murad.
>
> > Remember, this is an important part of the FIX session’s recovery mechanism. After a comms failure, the ability to resend losst messages would be lost if we always reset to 1.
> >
> > Note also that more recent versions of FIX have a mechanism to reset the sequence numbers as part of the login message. This is typically used as part of the end/start of day processing.
> >
> >
> > > It could be negotiable between the client(Organization) and Server(Organization). Mostly if the client tries to re-connect on the same day, the server would expect the increment of the last sequence number. However the client can also negotiate with the server side to reset the sequence number.
> > > Hope this Helps.
> > >
> > > Vijay.
> > >
> > >
> > > > Hi all,
> > > >
> > > > What sequence number to use after a logout is successful? For example, if a client to a FIX server logs out successfully and then reattempts a login after 10 minutes (the same day), should the message sequence number be initialized to 1 agai? or the last sequence number received when the client was logged in should be incremented?
> > > >
> > > > Regards,
> > > > Murad.
> > > >
> > >
> >
>