{{Quickfixn}} Persisting messages in the DB

Jose Chavez jose.e.chavez at gmail.com
Fri Apr 15 12:05:30 PDT 2016


One idea is to make a separate log file just for FIX messages. At end of
day you then run a batch job to import messages to DB.
On Apr 15, 2016 1:54 PM, "Grant Birchmeier" <gbirchmeier at connamara.com>
wrote:

> This is not a built-in feature.  I'm not sure if it should be.
>
> My key piece of advice would be: *Do not do the DB save on the QF
> callback thread!*  Implement a work queue.  When a message comes in that
> you want to save, have your OnMessage(x) method save it in that queue.  A
> separate DB-writer thread should block on that queue and pop messages off
> to save them in the DB.  (If you search for C# BlockingQueue, you'll find
> some samples.)
>
> (QF callbacks are single-threaded.  If any of them take a long time doing
> something (like, say, doing DB stuff), they'll cause the engine's message
> queue to get backed up and you'll eventually disconnect because of lag.)
>
> Other advice:
>
>    - Do your DB-work-queue pushes in OnMessage() callbacks.  I don't see
>    a good reason to do it in FromApp(), unless you are sure you really want
>    all messages of all types.
>    - If it's a market data connection, ABORT ABORT!  Too much data, and
>    old data is not useful anyway.  There's no reason to save this stuff.
>
> -Grant
>
>
> On Thu, Apr 14, 2016 at 11:24 AM, James A. Smith <jsmith at anstca.com>
> wrote:
>
>> I’m new to QuickFix.  I need a way to persist all messages into the DB.
>> Can QuickFix/N do this out of the box?  If so, can you point me to examples
>> or documentation for this?  I can’t seem to find anything?
>>
>>
>>
>> Thanks,
>>
>> James
>>
>> _______________________________________________
>> Quickfixn mailing list
>> Quickfixn at lists.quickfixn.com
>> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
>>
>>
>
>
> --
> Grant Birchmeier
> *Connamara Systems, LLC*
> *Made-To-Measure Trading Solutions.*
> Exactly what you need. No more. No less.
> http://connamara.com
>
> _______________________________________________
> Quickfixn mailing list
> Quickfixn at lists.quickfixn.com
> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20160415/80c3791d/attachment-0002.htm>


More information about the Quickfixn mailing list