[Quickfix-developers] Message recovery
Brought to you by:
orenmnero
From: Hugo L. <Hug...@in...> - 2002-12-16 11:41:06
|
Hi, I noticed a tiny problem during the message recovery process between two applications using quickfix-1.3.2 (c++). Consider the following example: - Tradeclient asks Executor to resend of messages 58 to 78 ; - Executor sends message 58 ; - Since the rest of the messages were administrative level, executor then sends a SequenceReset with NewSeqNo = 79 ; - So far so good... - After a while, Tradeclient sends a heartbeat. - Executor responds to the heartbeat but with MsgSeqNum = 80 (!). This causes another resend request from tradeclient. - Executor responds with a SequenceReset with NewSeqNo = 80, GapFillFlag = Y; The NextSenderMsgSeqNum has to be set to the next correct value. I believe the problem lies within Session::nextResendRequest (session.cpp). Here's my suggestion: (...) if ( begin ) generateSequenceReset( begin, msgSeqNum + 1 ); m_state.incrNextTargetMsgSeqNum(); // Must set this, otherwise next outgoing SeqNum will be endSeqNo + 2, // causing another resend request from the peer m_state.setNextSenderMsgSeqNum( endSeqNo + 1); } (...) Thanks in advance, Hugo Leote |