RE: [Quickfix-developers] Re: Intermittent disconnect problem
Brought to you by:
orenmnero
From: <or...@qu...> - 2005-02-04 16:54:26
|
Hi Michael, Thanks. What version of QuickFIX are you using? I ask because in 1.9.0 we introduced a similar fix for this. Instead of calling onTimeout after the read call, the session is calling next() after it processes each message, which should have a similar effect. Was your fix applied to a 1.9.x version or an earlier one? --oren > -------- Original Message -------- > Subject: [Quickfix-developers] Re: Intermittent disconnect problem > From: "Michael Holm" <mh...@li...> > Date: Fri, February 04, 2005 4:42 am > To: qui...@li... > > I have seen a similar problem when connecting to SFE. They require that > I follow the heartbeat procedure defined in the Fix spec. with one > exception. At initial start-up time or at certain times throughout the > day they may blast a huge amount of data to me which needs to be > processed. The QuickFix engine gives priority to these messages and > starves the heartbeat time slice. So if I am processing these messages > for more then the agreed upon heartbeat period SFE will disconnect the > session on their side and then QuickFix re-establishes the session and > resyncs. And then they have to retransmit messages and as you can see I > will encounter a never ending loop of shit. So I modified the following > to code to stop QuickFix from starving the heartbeats. > > > > In the following method - void SocketInitiator::onData( SocketConnector& > connector, int s ) > > > > The current code: > > while( pSocketConnection->read( connector ) ) > > {} > > > > My modified version: > > while( pSocketConnection->read( connector ) ) > > { > > // Modified 11-26-03 by M. Holm. Because heartbeats are being starved! > > i->second->onTimeout(); > > } > > > > This will ensure that heartbeats will be sent when necessary according > to the SFE spec. > > > > You might be having a similar problem to the one I encountered. > > > > Hope this helps. > > > > Michael Holm > > Liquid Capital Markets Ltd > 11 Old Jewry > London EC2R 8DU > Tel:020 7726 3028 |