I am trying to implement login for a non-standard fix protocol using quickfix in python.
The sequence is: Login (35=A,10001=A) -> 1st login rsp -> Login (35=A,10002=B) -> 2nd login rsp (login success)
Basically, I have to send logon messages 35=A twice, each time with different tags to complete the login sequence.
I am using the fromAdmin() and toAdmin() calls in quickfix python to do this. However, when testing my implementation, I got the error “Logon state is not valid for message” in quickfix event logs when I received the 2nd login response, which comes from the engine here https://github.com/quickfix/quickfix/blob/0b88788710b6b9767440cd430bf24c6b6e2080a2/src/C%2B%2B/Session.cpp#L1048
It seems internally quickfix engine is maintaining “receivedLogon” and so my 2nd logon response is causing an error and making quickfix disconnect my session.
Is there a workaround to support this special login sequence in quickfix python, or to just allow quickfix to accept multiple logon responses?