[Quickfix-developers] Resync problems ... Infinite Resend
Brought to you by:
orenmnero
From: Angela M. <A.M...@it...> - 2004-04-21 13:53:19
|
Hi Oren, there is another problem during the resync phase that generate the = infinite resend request and it appens because of the Logon message is = put in the queue this means when I receive a sequence reset with the = same sequence number of logon message QuickFix can't process this = message because it processes the Logon message that increment the seqnum = and doesn't process the sequencereset because of seqnum < than seqnum = expexted after the reprocessed Logon message. This is an example to clarify my explanation: Last message received 34 =3D 24 send 35=3DA 34=3D ... receive 35=3DA;34=3D26 send 35=3D2;34=3D...;7=3D25 receive 35=3D8;34=3D25 receive 35=3D4;34=3D26 from here every message I receive QuickFix generate a resendRequest from = 27 receive 35=3D8;34=3D30 receive 35=3D8;34=3D31 receive 35=3D8;34=3D32 and so on .... I made this change to the session.cpp file: void Session::doTargetTooHigh( const Message& msg ) { QF_STACK_PUSH(Session::doTargetTooHigh) const Header & header =3D msg.getHeader(); BeginString beginString; MsgSeqNum msgSeqNum; MsgType msgType; /* AMetallo 23/01/2004 */ header.getField( beginString ); header.getField( msgSeqNum ); header.getField( msgType ); /* AMetallo 23/01/2004 */ =20 m_state.onEvent( "MsgSeqNum too high RECEIVED: " + IntConvertor::convert( msgSeqNum ) + " EXPECTED: " + IntConvertor::convert( getExpectedTargetNum() ) ); /* = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D * AMetallo 23/01/2004 BF -=20 * = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/ if ( msgType !=3D MsgType_Logon) { m_state.onEvent( "<doTargetTooHigh> Inserisco nella coda xche' seqnum = >. MsgType " + msgType.getString()); m_state.queue( msgSeqNum, msg ); } /* = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D * AMetallo 23/01/2004 BF -=20 * = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/ generateResendRequest( beginString, msgSeqNum ); QF_STACK_POP } Oren I tested this change and it works, do you think it is possible to = insert this modification in QuickFix? Just another little problem in the session.cpp when I receive an empty = message the application crash so I did another little change to prevent = this in the Session::next( const std::string& msg ) method as follow: void Session::next( const std::string& msg ) { QF_STACK_PUSH(Session::next) try { m_state.onIncoming( msg ); /* = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D * AMetallo 04/02/2004 BF START * = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/ if (msg.length() <=3D 1 || msg.empty()) { m_state.onEvent("<Session::next> Ricevuto messaggio vuoto per cui lo = scarto!" ); return; } /* = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D * AMetallo 04/02/2004 BF END * = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/ next( Message( msg, m_dataDictionary ) ); }=20 catch( InvalidMessage& e ) { m_state.onEvent( e.what() ); try { if( identifyType(msg) =3D=3D MsgType_Logon ) disconnect(); } catch( MessageParseError& ) {} throw e; /* This exception isn't catched why ? It cause the cras of = my application*/ } QF_STACK_POP } Thank you Angela __________________________________ Angela Metallo IT SOFTWARE S.p.A. Via Santa Sofia 27 - 20122 Milano Phone +39 02.58343.339 Fax +39 02.58315.195 mailto:a.m...@it... www.itsoftware.it This message is for the named person's use only. It may contain = confidential, proprietary or legally privileged information. No = confidentiality or privilege is waived or lost by any mistransmission. = You may not, directly or indirectly, use, disclose, distribute, print, = or copy any part of this message if you are not the intended recipient. = You are therefore equested to cancel this e-mail and the relating = attachments if you are not the intended recipient. IT SOFTWARE S.p.A. = does not warrant, whether to the intended recipient or to anybody else, = that any attachments are free from viruses or other defects and accept = no liability for any losses resulting from infected email transmissions. = Please note, that any views expressed in this message are those of the = individual sender, except where the sender specifically states them to = be the views of IT SOFTWARE S.p.A. |