|
From: Steve B. <st...@te...> - 2007-06-12 01:57:38
|
> t.s. wrote: > As per the subject, i'm wondering about QuickfixJ reconnection policy > (for initiators). Suppose an Initiator got disconnected (for whatever > reason: network problems, power problems, hardware problems, > acceptor/server maintenance, etc), what's gonna happen next ? A QFJ initiator will periodically attempt to reconnect. Once a connection is established, the initiator will attempt to login with the counterparty. You can see this behavior with the Banzai (client) and Executor (server) examples in the QFJ distribution. Start Banzai first and you will see it trying to connect periodically. Start the Executor and you will see Banzai connect. Stop the executor and Banzai will start trying to connect again. > There were mentions about 'ReconnectInterval' parameter in the config > file; does it mean that the initiator will retry to reconnect > indefinitely? Is the mechanism reliable ? Yes, it will reconnect indefinitely. And it's reliable as far as I know. What problems were you experiencing? > I couldn't make it work (with a third party server, so i don't know much > about the implementation details on their side) during my earlier tests, > so i resorted to using a background thread to create another instance of > the initiator when it detected any problems with the current one. This > approach worked fine so far, with a rather nasty catch. I strongly recommend using the built-in reconnection capabilities instead of this approach. It might work to some extent, but the initiators are not designed to be used this way. Steve |