Re: [Quickfix-developers] Re: monitor the FIX connection failure programmatically?
Brought to you by:
orenmnero
|
From: Oren M. <or...@qu...> - 2005-11-04 20:04:27
|
Yup.
--oren
----- Original Message -----=20
From: Alvin Wang=20
To: Oren Miller=20
Cc: Caleb Epstein ; qui...@li... ; =
qui...@li...=20
Sent: Friday, November 04, 2005 7:21 PM
Subject: Re: [Quickfix-developers] Re: monitor the FIX connection =
failure programmatically?
Oren, at around EndTime, the initiator will disconnect (the normal =
behavior). If I call Session::isSessionTime() inside onLogout(), will it =
return false?=20
Thanks=20
Alvin=20
"Oren Miller" <or...@qu...>=20
11/04/2005 02:53 PM=20
=20
To: "Caleb Epstein" <cal...@gm...>, =
"Alvin Wang" <AW...@FF...>=20
cc: <qui...@li...>, =
<qui...@li...>=20
bcc: =20
Subject: Re: [Quickfix-developers] Re: monitor =
the FIX connection failure programmatically?=20
You can use Session::isSessionTime() to determine if you are within =
the start and end times. The hearbeat interval has nothing to do with =
when the session disconnects.=20
=20
--oren=20
----- Original Message -----=20
From: Alvin Wang=20
To: Caleb Epstein=20
Cc: Oren Miller ; qui...@li... ; =
qui...@li...=20
Sent: Friday, November 04, 2005 1:48 PM=20
Subject: Re: [Quickfix-developers] Re: monitor the FIX connection =
failure programmatically?=20
Caleb, we want to differentiate the normal logout/disconnect at the =
end of day, and the abnormal logout/disconnect during the session. (is =
it safe to assume that onLogout will not be called between Endtime and =
StartTime?) So my question is, can we use isLoggedOn method inside =
onLogout to make above judgement? If isLoggedOn=3Dtrue, it is abnormal.=20
Or, what is the algorithm to decide exact when the initiator will =
disconnect at (around) the EndTime? For example, the EndTime is 22:00:00 =
and heartbeat interval is 30 seconds. Now the initiator sends a =
heartbeat at 21:59:10. will the initiator disconnect at 21:59:40 or =
22:00:10?=20
Many thanks=20
Alvin=20
Caleb Epstein <cal...@gm...>=20
Sent by: qui...@li...=20
11/04/2005 10:35 AM=20
=20
To: Alvin Wang <AW...@ff...>=20
cc: Oren Miller <or...@qu...>, =
qui...@li..., =
qui...@li...=20
bcc: =20
Subject: Re: [Quickfix-developers] Re: monitor the =
FIX connection failure programmatically?=20
On 11/4/05, Alvin Wang <AW...@ff...> wrote:=20
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 tell if it is an abnormal logout/disconnection?=20
Not trying to argue, but what if the FIX session is not never setup =
from beginning due to network problem? Will onLogout be called?=20
I wouldn't call asking questions being argumentative :)=20
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 known sessions and uses FIX::Session::lookupSession + =
Session::isLoggedOn to capture those connections that either never come =
up or are outside their StartTime/EndTime windows.=20
Pseudocode:
foreach (SessionID as id)
{
Session* sess =3D Session::lookupSession (id);
if (!sess) continue;
send_connection_status (id, sess->isLoggedOn () ? "UP" : "DOWN");=20
}=20
--=20
Caleb Epstein
caleb dot epstein at gmail dot com=20
********************************************************************** =
This e-mail message is intended solely for the use of the addressee. The =
message may contain information that is privileged and confidential. =
Disclosure to anyone other than the intended recipient is prohibited. If =
you are not the intended recipient, please do not disseminate, =
distribute or copy this communication, by e-mail or otherwise. Instead, =
please notify us immediately by return e-mail (including the original =
message with your reply) and then delete and discard all copies of the =
message. We have taken precautions to minimize the risk of transmitting =
software viruses but nevertheless advise you to carry out your own virus =
checks on any attachment to this message. We accept no liability for any =
loss or damage caused by software viruses. =
**********************************************************************=20
|