Logon and Sequence Reset

Imported from previous forum

[ original email was from Andrew Drummond - andrew.drummond@ubsw.com ]
As I understand it:

  1. The first message upon connection must be a logon message, to which the acceptor must send back a logon message to confirm the session is established. If there was a message gap indicated the acceptor will then send a Resend Request message for the gap.

  2. To reset a session one party sends a Logon message with the ResetSeqNumFlag field set, to which the other side must reply with a similair logon message to confirm the start of a new session. From this point on no historical orders from the previous session will be available for request with a Resend Request message.

  3. Before sending a resetting logon message the 4.2 spec recommends sending a TestRequest and then waiting for a heartbeat to ensure that there are no message gaps.

My question is:

Is it forbidden for the first logon message of a connection to also have the ResetSeqNumFlag set? Such a message would have the MsgSeqNum field set to 1, which would mean the acceptor could not detect any message gap from the previous session.

Therefore, to start a new session on connection the initiator should first send a normal logon and wait for the reply logon before sending the resettting logon message. The acceptor would not send the reply resettting logon message until message recovery was complete.

Note that the CME FIX 4.2 interface says that client are required to reset their sequence numbers at the start of every week (Sunday), so the first mnessage I send should be a resetting logon. This means I cannot detect any message gaps from the previous session. WHat if I haven’t connected since last Wednesday?

Andrew Drummond

What if the first logon message has the ResetSeqNumFlag set to start a new session, but the message sequence number is greater than that expected by the acceptor, indicating a message gap. The spec indicates that I should send a Logon message back as the first message I send, but as soon as I do we will have started a new session, and I will not be able to retrieve the missing messages from the previous session.

I would have preferred the general logon sequence to go like this:

  1. Initiator sends logon message
  2. Acceptor sees message gap and issues ResendRequests
  3. Initiator receives and services ResendRequests
  4. Acceptor processes missing messages
  5. Acceptor issues logon message confirming new session or restored session
  6. If logon message had ResetSeqNumFlag set to start a new session

[ original email was from Andrew Drummond - andrew.drummond@ubsw.com ]
Sorry, I should have deleted the ramblings after the signature in the original message.

> As I understand it:
>
> 1) The first message upon connection must be a logon message, to which the acceptor must send back a logon message to confirm the session is established. If there was a message gap indicated the acceptor will then send a Resend Request message for the gap.
>
> 2) To reset a session one party sends a Logon message with the ResetSeqNumFlag field set, to which the other side must reply with a similair logon message to confirm the start of a new session. From this point on no historical orders from the previous session will be available for request with a Resend Request message.
>
> 3) Before sending a resetting logon message the 4.2 spec recommends sending a TestRequest and then waiting for a heartbeat to ensure that there are no message gaps.
>
> My question is:
>
> Is it forbidden for the first logon message of a connection to also have the ResetSeqNumFlag set? Such a message would have the MsgSeqNum field set to 1, which would mean the acceptor could not detect any message gap from the previous session.
>
> Therefore, to start a new session on connection the initiator should first send a normal logon and wait for the reply logon before sending the resettting logon message. The acceptor would not send the reply resettting logon message until message recovery was complete.
>
> Note that the CME FIX 4.2 interface says that client are required to reset their sequence numbers at the start of every week (Sunday), so the first mnessage I send should be a resetting logon. This means I cannot detect any message gaps from the previous session. WHat if I haven’t connected since last Wednesday?
>
> Andrew Drummond
>
>