RE: [Quickfix-developers] Re: Intermittent disconnect problem
Brought to you by:
orenmnero
From: Bishop, B. <Bar...@gs...> - 2005-02-04 16:55:17
|
Hi Michael, Thanks for your suggestions, although I think you have a different problem to me. We never have sudden bursts of traffic (inbound or outbound) and sometimes we disconnect after 10 seconds of complete inactivity. In your case though, wouldn't it be better pass the inbound messages on to a separate thread. This would unload the FIX thread to carry doing what it does best, leaving you as much time as you need to process all the messages. It would also save patching the quickfix code for this specal case. Best of luck, barry -----Original Message----- From: qui...@li... [mailto:qui...@li...] On Behalf Of Michael Holm Sent: Friday, February 04, 2005 10:43 AM To: qui...@li... Subject: [Quickfix-developers] Re: Intermittent disconnect problem 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 |