Re: [Quickfix-developers] Re: monitor the FIX connection failure programmatically?
Brought to you by:
orenmnero
|
From: Caleb E. <cal...@gm...> - 2005-11-04 15:35:51
|
On 11/4/05, Alvin Wang <AW...@ff...> wrote:
So does it mean even when the physics connection is down and we did not
> receive logout msg, onLogout will still be invoked? If so, how can we tel=
l
> if it is an abnormal logout/disconnection?
>
> Not trying to argue, but what if the FIX session is not never setup from
> beginning due to network problem? Will onLogout be called?
I wouldn't call asking questions being argumentative :)
No, if a connection never comes up you'll never get an onLogout callback.
I have implemented some monitoring of QuickFIX connections by making use of
the onLogon/onLogout callback (for immediate notification when a connection
comes up or goes down) coupled with a thread that iterates through all know=
n
sessions and uses FIX::Session::lookupSession + Session::isLoggedOn to
capture those connections that either never come up or are outside their
StartTime/EndTime windows.
Pseudocode:
foreach (SessionID as id)
{
Session* sess =3D Session::lookupSession (id);
if (!sess) continue;
send_connection_status (id, sess->isLoggedOn () ? "UP" : "DOWN");
}
--
Caleb Epstein
caleb dot epstein at gmail dot com
|