Re: [Quickfix-developers] Errors in sequence numbers
Brought to you by:
orenmnero
|
From: Pasquale d'A. <pas...@ga...> - 2005-12-14 11:44:51
|
Hello Francesco,
I don't know why you and your counterpart go out of sequence,
but I think there is a bug in QuickFIX that doesn't let you to regain the
sequence
alignment.
The logs you get derive from the code in the function
void Session::doTargetTooHigh( const Message& msg ) (file Session.cpp):
.....
if( m_state.resendRequested() )
{
SessionState::ResendRange range =3D m_state.resendRange();
if( msgSeqNum > range.first
&& (range.second =3D=3D 0 || msgSeqNum < range.second) )
{
m_state.onEvent ("Already sent ResendRequest FROM: " +
IntConvertor::convert (range.first) + " TO: " =
+
IntConvertor::convert (range.second) +
". Not sending another.");
return;
}
}
.......
First time you reconnect, m_state.resendRequested() should return false b=
ut
I think
it returns true because the member m_state.m_resendRange is not
initialized. It seems to me that member m_state.m_resendRange is
initialized only in the function
Session::disconnect() (statement: m_state.resendRange( 0, 0 );) while it
should be initialized also in the Session or SessionState constructor.
About your last question, the choice of requesting the resending from n t=
o 0
(infinity)
is strongly recommended by the FIX protocol:
<<... if message number 7 is missed and 8-9 received, the application sho=
uld
ignore 8 and 9 and ask for a
resend of 7-9, or, preferably, 7-0 (0 represents infinity). This latter
approach is strongly recommended
to recover from out of sequence conditions as it allows for faster recove=
ry
in the presence of certain
race conditions when both sides are simultaneously attempting to recover =
a
gap....>>
(extracted from the document "fix-42-with_errata_20010501.pdf").
Regards, P. d'Aloise
------------------------------------
Pasquale d'Aloise
pas...@ga...
GATE T.I.
S.S. 17 - Loc. Nunziatella
86170 ISERNIA - Italy
Tel. 0039-0865-451890
> ----- Original Message -----
> From: <Fra...@mp...>
> To: <qui...@li...>
> Sent: Tuesday, December 13, 2005 1:46 PM
> Subject: [Quickfix-developers] Errors in sequence numbers
>
>
> QuickFIX Documentation:
> http://www.quickfixengine.org/quickfix/doc/html/index.html
> QuickFIX Support: http://www.quickfixengine.org/services.html
>
> I there!
> I'm experiencing this error while I reconnect to the server.
> Where in the code have I to catch this and what exactly have I to do?
> Change SeqNum, or force some other method?
> Why quickfix sends ResendRequest "FROM: 1 TO: 0" and not ResendRequest
> "FROM: 1 TO: 74"?
> Many thanks for your help.
>
> 20051213-12:41:02 : Created session
> 20051213-12:41:02 : Connecting to xxx.xxx.xxx.xxx on port xxxxx
> 20051213-12:41:02 : Connection succeeded
> 20051213-12:41:03 : Initiated logon request
> 20051213-12:41:03 : Received logon response
> 20051213-12:41:03 : MsgSeqNum too high, expecting 1 but received 72
> 20051213-12:41:03 : Sent ResendRequest FROM: 1 TO: 0
> 20051213-12:41:33 : MsgSeqNum too high, expecting 1 but received 73
> 20051213-12:41:33 : Already sent ResendRequest FROM: 1 TO: 0. Not send=
ing
> another.
> 20051213-12:42:03 : MsgSeqNum too high, expecting 1 but received 74
> 20051213-12:42:03 : Already sent ResendRequest FROM: 1 TO: 0. Not send=
ing
> another.
>
>
>
> Francesco Pispola
>
>
>
> http://www.mpsfinance.it
> - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> Le informazioni contenute nel presente e-mail e nei documenti
eventualmente
> allegati sono confidenziali e sono comunque riservate al destinatario
delle
> stesse. La loro diffusione, distribuzione e/o copia da parte di ter=
zi
=E8
> proibita e pu=F2 costituire violazione della normativa che tutela il
diritto
> alla privacy. Se avete ricevuto questa comunicazione per errore=
,
Vi
> preghiamo di informare immediatamente il mittente del messaggio =
e
di
> distruggere questo e-mail.
> - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> This e-mail is confidential and it is legally privileged. If you have
> received it in error, please notify us immediately by reply e-mail and
then
> delete this message from your system. Please do not copy it or use it f=
or
> any purposes, or disclose its contents to any other person. Mind that t=
o
do
> so could be a breach of Italian privacy Law. Thank you for your
> co-operation.
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_idv37&alloc_id=16865&op=3Dick
> _______________________________________________
> Quickfix-developers mailing list
> Qui...@li...
> https://lists.sourceforge.net/lists/listinfo/quickfix-developers
>
>
>
>
|