Re: [Quickfix-developers] MsgSeqNum too high problem
Brought to you by:
orenmnero
|
From: Brian E. <azz...@ya...> - 2005-06-27 19:15:59
|
Oren -
I believe the following change to Session.cpp will fix the timeout
problem when receiving out-of-sequence messages while awaiting a
sequence reset/gap-fill:
Move the following lines in Session::verify(...)
UtcTimeStamp now;
m_state.lastReceivedTime( now );
from their current position up to a spot just before the preceding
if/else clause:
-->>Place the code here<<--
if ( checkTooHigh && isTargetTooHigh( msgSeqNum ) )
This will increment the "lastReceivedTime" in the SessionState object
even when the sequence number is wrong. This appears to solve a whole
bunch of interrelated timeouts that could occur in this scenario (test
request, heartbeat, logon response, etc.) in one quick hit. Sequence
too low is largely unaffected by this change, as it will cause a
disconnect when hit, so that part of the code shouldn't need to be
rearranged.
It was somewhat unclear to me whether the following line:
m_state.testRequest( 0 );
Also needed to be moved, but it seemed like it did not.
- Brian Erst
Thynk Software, Inc.
--- Oren Miller <or...@qu...> wrote:
> QuickFIX Documentation:
> http://www.quickfixengine.org/quickfix/doc/html/index.html
> QuickFIX FAQ:
> http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ
> QuickFIX Support: http://www.quickfixengine.org/services.html
>
> Seems to me this shouldn't be happening. I'm guessing that the
> engine isn't
> processing the message because the sequence number is too high, hence
> no
> heartbeat is processed. I believe that out of sequence messages
> should
> probably count as a keep-alive even if their contents arn't
> processed.
>
> --oren
>
> ----- Original Message -----
> From: "Alexey Zubko" <ale...@in...>
> To: <qui...@li...>
> Sent: Monday, June 27, 2005 1:44 PM
> Subject: [Quickfix-developers] MsgSeqNum too high problem
>
>
> > QuickFIX Documentation:
> > http://www.quickfixengine.org/quickfix/doc/html/index.html
> > QuickFIX FAQ:
> http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ
> > QuickFIX Support: http://www.quickfixengine.org/services.html
> >
> > Hi,
> >
> > I'd like to ask if QF initiator acts correctly in the following
> scenario.
> > The initiator detects that seqnum of a server is too high and sends
> a
> > resend message.
> > The server doesn't resend requested messages, but there are
> heartbeat
> > messages.
> > The initiator disconnects because of timeout on heartbeat. :-)
> > Below is the initiator's log.
> >
> > 20050627-17:52:50 : Created session
> > 20050627-17:52:51 : Connecting to eng-server on port 5725
> > 20050627-17:52:51 : Connection succeeded
> > 20050627-17:52:52 : Initiated logon request
> > 20050627-17:53:15 : Received logon response
> > 20050627-17:53:15 : MsgSeqNum too high, expecting 13 but received
> 15
> > 20050627-17:53:15 : Sent ResendRequest FROM: 13 TO: 14
> > 20050627-17:53:15 : MsgSeqNum too high, expecting 13 but received
> 16
> > 20050627-17:53:15 : Sent ResendRequest FROM: 13 TO: 15
> > 20050627-17:53:15 : MsgSeqNum too high, expecting 13 but received
> 17
> > 20050627-17:53:15 : Sent ResendRequest FROM: 13 TO: 16
> > 20050627-17:53:22 : Sent test request TEST
> > 20050627-17:53:22 : MsgSeqNum too high, expecting 13 but received
> 18
> > 20050627-17:53:22 : Sent ResendRequest FROM: 13 TO: 17
> > 20050627-17:53:37 : MsgSeqNum too high, expecting 13 but received
> 19
> > 20050627-17:53:37 : Sent ResendRequest FROM: 13 TO: 18
> > 20050627-17:53:40 : Timed out waiting for heartbeat
> > 20050627-17:53:40 : Disconnecting
> >
> >
> >
> > --
> >
> > Regards,
> > Alexey Zubko
> >
> > Infinium Capital Corporation
> > (416) 360-7000 ext. 305
> >
> >
> >
> > -------------------------------------------------------
> > SF.Net email is sponsored by: Discover Easy Linux Migration
> Strategies
> > from IBM. Find simple to follow Roadmaps, straightforward articles,
> > informative Webcasts and more! Get everything you need to get up to
> > speed, fast.
> http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> > _______________________________________________
> > Quickfix-developers mailing list
> > Qui...@li...
> > https://lists.sourceforge.net/lists/listinfo/quickfix-developers
> >
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration
> Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Quickfix-developers mailing list
> Qui...@li...
> https://lists.sourceforge.net/lists/listinfo/quickfix-developers
>
|