[Quickfix-developers] How to reset the session only at start time
Brought to you by:
orenmnero
From: Alain T. <a....@ne...> - 2009-07-06 09:23:52
|
Hi, I'm on the initiator side and I have problems to get this behavior with quickfix (C++ and .Net wrappers) - the initiator resets the connexion at start time (MsgSeqNum=1, ResetSeqNumFlag=Y) - it does not resets the connection at other times like a logon after a disconnection When I set "reset on logon" at true the flag is set but it also resets sessions if it reconnects during the day (similar issues with the two other "reset on" settings) When I set the flags to false, the session is reset at start time, but ResetSeqNumFlag is missing. According to the source code, this flag is never set if these settings are disabled: bool Session::shouldSendReset() { QF_STACK_PUSH(Session::shouldSendReset) std::string beginString = m_sessionID.getBeginString(); return beginString >= FIX::BeginString_FIX41 && ( m_resetOnLogon || m_resetOnLogout || m_resetOnDisconnect ) && ( getExpectedSenderNum() == 1 ) && ( getExpectedTargetNum() == 1 ); QF_STACK_POP } According to this comment in the FIX 4.4 spec, I don't see when a logon message can have MsgSeqNum=1 and not the tag ResetSeqNumFlag. " ... the initiator should send a Logon with ResetSeqNumFlag set to Y and with MsgSeqNum of 1. The acceptor should respond with a Logon with ResetSeqNumFlag set to Y and with MsgSeqNum of 1. At this point new messages from either side should continue with MsgSeqNum of 2. It should be noted that once the initiator sends the Logon with the ResetSeqNumFlag set, the acceptor must obey this request and the message with the last sequence number transmitted "yesterday" may no longer be available. The connection should be shutdown and manual intervention taken if this process is initiated but not followed properly." Thanks for any hint ! -- Alain Tésio Nexfi |