{{Quickfixn}} CheckLatency
Grant Birchmeier
gbirchmeier at connamara.com
Tue Jul 15 09:42:02 PDT 2025
The defaults latency settings are CheckLatency=Y and MaxLatency=120.
QF/n handles messages serially-- when messages A, B, and C are received,
they go into a queue. The engine calls FromApp/FromAdmin on message A, and
does not do anything with B until the FromApp(A)/FromAdmin(A) callback
returns.
FromApp and FromAdmin are user code, i.e. that's your code, not the
engine. If those functions are written so that they don't return quickly,
then the message queue will start to back up with unhandled messages. If
you are receiving messages faster than you consume them, then this latency
check will be triggered.
With the above defaults, if 120 seconds elapse between receiving a message
and processing it, the engine will throw an error and disconnect. This can
a good thing in a trading situation, because the market can move a lot in 2
minutes; you don't want to be acting on old data.
Turning CheckLatency off disables this check, and is not advised.
I have actually run into this situation before. I had a client move their
app to a slower VM without telling me, and it was not capable of handling
the firehose of data we were accustomed to seeing it receive without
trouble. Without this latency check, I wouldn't have learned about it
until much later.
-Grant
On Mon, Jul 14, 2025 at 10:45 PM somnath pal <palsomnath at hotmail.com> wrote:
>
> It is good that you pointed out about CheckLatency. I could not find any
> information on this. Can you point me to any link or example where I could
> have details like the effect of CheckLatency=Y vs N.
>
>
--
This email, along with any attachments, is confidential. If you believe you
received this message in error, please contact the sender immediately and
delete all copies of the message. Thank you from Connamara Systems, LLC.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20250715/c0f1397d/attachment.htm>
More information about the Quickfixn
mailing list