Re: [Quickfix-developers] FIX message replay by a quickfix acceptor
Brought to you by:
orenmnero
|
From: Dale W. <wil...@oc...> - 2005-12-13 22:08:04
|
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/
----------------------------------------------------
|