[Quickfix-developers] Re: Intermittent disconnect problem
Brought to you by:
orenmnero
From: Michael H. <mh...@li...> - 2005-02-04 10:42:52
|
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. =20 In the following method - void SocketInitiator::onData( SocketConnector& connector, int s ) =20 The current code: while( pSocketConnection->read( connector ) ) {} =20 My modified version: while( pSocketConnection->read( connector ) )=20 { // Modified 11-26-03 by M. Holm. Because heartbeats are being starved! i->second->onTimeout(); } =20 This will ensure that heartbeats will be sent when necessary according to the SFE spec. =20 You might be having a similar problem to the one I encountered. =20 Hope this helps. =20 Michael Holm Liquid Capital Markets Ltd 11 Old Jewry London EC2R 8DU Tel:020 7726 3028 =20 |