Re: [Quickfix-developers] FIX message replay by a quickfix acceptor
Brought to you by:
orenmnero
|
From: Oren M. <or...@qu...> - 2005-12-13 22:33:46
|
Right you are! --oren Dale Wilson wrote: > Of course right after I sent the message I realized that I'd told you > how to find messages you had SENT. That's different from finding > messages that arrived during the downtime which is probably what you > had in mind. > > Oh well. > > To make up for my confusion, I'll point out that is fairly easy to > provide a custom logger so if you don't like the file locking > technique FIX uses you can roll your own relatively easily. > > Dale > > > Dale Wilson wrote: > >> Hi Andrew, >> >> Andrew Freese wrote: >> >>> Hello all, been looking through the online docs and list archives >>> but haven't found anything yet so here goes - >>> >>> In the system i've inherited (environment is C++ on 64bit Linux), >>> there is an "Order Matcher" (OM) which sometimes routes orders out >>> to the outside world via a Quickfix Initiator (QI). OM and QI >>> communicate via messaging, ie. NOT via Quickfix. >>> >>> Here's my task: when OM recovers from a crash, it must query QI for >>> all events which occurred since it crashed at XX:XX time. >> >> >>> Broadly, the options i've considered are A) QA itself responds to >>> OM's query, or B) a separate process responds to OM's query. >>> >>> >>> 1. If OM were a quickfix Initiator and QI were a quickfix Acceptor, >>> i realize this would be a regular recovery reconnect. Given that QI >>> acts as a sort of "Acceptor", as an Initiator object does it have >>> access to the same replay functionality? >>> >>> 2. Further to option B), given that QI continuously writes to its >>> FIX logs, would there be any problem with a secondary process >>> reading the file? Basically i'm asking what type of file locking is >>> the quickfix Initiator using? >> >> >> Assuming you can identify the point in time at which the OM crashed >> and express that in terms of the FIX sequence numbers that were in >> use at the time of the crash, you can retrieve the FIX messages >> within the QI (that would be option A) using code similar to: >> >> std::vector< std::string > msgs; >> session_->getStore()->get(startNum, endNum, msgs); >> Then for each entry in msgs you can reconstitute a QuickFIX >> message like so: >> FIX::Message original(msgs[nEntry], session_->getDataDictionary()); >> >> That leaves the task of translating the FIX messages into something >> meaningful to the OM, but you probably already have code to do that. >> >> I'll leave the question of sharing the file for others to answer. >> >> HTH, >> >> Dale >> >> >>> >>> >>> Any help greatly appreciated. >>> >>> >>> thank you, >>> >>> Andrew Freese >>> af...@ra... >>> >> >> >>-- >>----------------------------------------------------- >> Dale Wilson, Senior Software Engineer >> Object Computing, Inc. (OCI) >> http://www.ociweb.com/ http://www.theaceorb.com/ >>---------------------------------------------------- >> > > >-- >----------------------------------------------------- > Dale Wilson, Senior Software Engineer > Object Computing, Inc. (OCI) > http://www.ociweb.com/ http://www.theaceorb.com/ >---------------------------------------------------- > |