Re: [Quickfix-developers] Recovering from client side sequence number amnesia
Brought to you by:
orenmnero
|
From: Oren M. <or...@qu...> - 2005-05-24 18:01:58
|
Dale, You can ask the session object for the expected sequence numbers. http://www.quickfixengine.org/quickfix/doc/html/class_f_i_x_1_1_session.h= tml#a27 --oren ----- Original Message -----=20 From: Dale Wilson=20 To: qui...@li...=20 Sent: Tuesday, May 24, 2005 12:53 PM Subject: [Quickfix-developers] Recovering from client side sequence = number amnesia Due to some network problems, I may (or may not) have managed to send = this message yesterday. Please forgive it if it's a duplicate. Dale Hi QuickFIX developers, I think I've run into a "you-can't-get-there-from-here" problem, but I'd = like to be sure I'm not missing something. The situation I'm trying to handle happens when the client (initiator) = is recovering from a significant failure and has lost track of the = sequence number expected by the server (acceptor). The client sends = logon message a sequence number that is less than the one expected by = the server. The server responds, correctly, with a logout message. If = the server is based on QuickFIX this logout message will contain a Text = field giving the expected sequence number.=20 i.e.: 58=3DMsgSeqNum too low, expecting 7 but received 1 What I would like to do is detect this Logout message; inform the user = of the situation; and allow them to verity that the sequence number = should be reset. Unfortunately as far as I have been able to determine, the Logout = message containig the expected sequence number never reaches the = application code. QuickFIX determines that this is not a valid sequence = of messages: [Session::verify calls Session::validLogonState and throws an = exception when it returns false. ]=20 and calls Application::onLogout() (twice, actually, but who's = counting.) The body of the message containing the expected sequence = number isn't available vis the onLogout call -- so I can't find a way to = determine what sequence number is expected. My work around for this will be to read the log, identify the logout = message, and parse it to find the expected sequence number -- unless, of = course, someone tells me that there's a better way. Any suggestions would be appreciated, Dale --=20 ----------------------------------------------------- Dale Wilson, Senior Software Engineer=20 Object Computing, Inc. (OCI) http://www.ociweb.com/ http://www.theaceorb.com/ ---------------------------------------------------- |