Skip to content

Initiator session does not Reset Sequence Numbers on logon on Reconnect #625

@adam-talos

Description

@adam-talos

I'm seeing an issue where my initiator session is not resetting its sequence numbers before logon even though ResetOnLogon is set to true when the server has disconnected it.

Compare this code in QuickFIXGo:
https://github.com/quickfixgo/quickfix/blob/04786a16e4a72a9eb6d30bf26376c509508da6cd/session_state.go#L46C1-L56C3

with this code in QuickFIXJ
https://github.com/quickfix-j/quickfixj/blob/bb2b919b8d4f286311e05cc418dff53f9ed517e1/quickfixj-core/src/main/java/quickfix/Session.java#L2062C1-L2091C6

In QuickFIXJ, the initiator session is resetting its sequence numbers right before sending the logon message. In quickFIXGo, the store is being reset in prepMessageForSend
https://github.com/quickfixgo/quickfix/blob/04786a16e4a72a9eb6d30bf26376c509508da6cd/session.go#L311C1-L328C4
Here we're checking the logon message for the 141=Y and only resetting if it is Y, so we won't try to reset the sequence numbers if we get disconnected and log on again.

I'm not sure what if there is a standard for this behavior, but probably it should match the QuickFIX standard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions