Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initiator reconnect loop when state is lost #431

Open
rubensayshi opened this issue Feb 2, 2021 · 1 comment
Open

initiator reconnect loop when state is lost #431

rubensayshi opened this issue Feb 2, 2021 · 1 comment

Comments

@rubensayshi
Copy link
Contributor

full disclosure: I'm fairly new to FIX
I've been messing around with quickfix and the session lifecycle and was interested to see how quickfix would handle the initiator loosing it's state entirely and starting with a clean state.

what seems to happen is that if MsgSeqNum on the Logon of the initiator doesn't match the TargetMsgSeqNum of the acceptor, the acceptor will disconnect instantly.
then the initiator will reconnect after 30s and will send Login with a +1 MsgSeqNum.

and this repeats, until eventually (depending on the msg history) the initiator has reached the proper MsgSeqNum and then the acceptor will actually accept the connection, the initiator sends a ResendRequest and we're good to go!

I think the right course of action would be for the initiator to send a reset?
but I can't seem to figure out how to detect this scenario and trigger that, or maybe the check in shouldSendReset should be an OR instead of AND?

@imirkin
Copy link

imirkin commented May 7, 2021

I think FIX would require you to manually set your session's sequence number to the "right thing". But if you do, and you've lost data, the other side won't know exactly how much data you've lost (which could matter for resends, which is a minor use-case). The idea of FIX is to be a reliable transmission line, and any cases of data loss require manual intervention. Don't lose data :)

If you don't care about data loss, then you can connect with 141=Y, which will wipe the state on the remote side as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants