Re: [Quickfix-developers] Stopping and starting individual Sessions?
Brought to you by:
orenmnero
From: Oren M. <or...@qu...> - 2005-03-14 21:29:53
|
Yeah, but you only need to call logout. You don't want to call disconnect because that will force a connection by shutting down the socket. Calling logout alone will allow QuickFIX to go through the proper logout sequence before shutting down. The logon call will then reawaken the session when you want to bring it back up. We have talked about adding dynamic session configuration. I think it will become one of the primary focuses for the next release. --oren On Mar 14, 2005, at 10:11 AM, Caleb Epstein wrote: > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX FAQ: > http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ > QuickFIX Support: http://www.quickfixengine.org/services.html > > We have a requirement to be able to stop and start individual Sessions > without having to bring down our entire QuickFIX engine. It is not > immediately obvious how to do this from browsing the code. As near as > I can figure calling Session::logout () and Session::disconnect () > should have the desired effect; the Initiator will not try > reconnecting, since logout sets m_enabled = false. Is this correct? > > for ( ; i != disconnected.end(); ++i ) > { > Session* pSession = Session::lookupSession( *i ); > if ( pSession->isEnabled() && pSession->isSessionTime() ) > setConnected( *i, doConnect( *i, m_settings.get( *i ) ) ); > } > > Also, any thoughts on modifying the Initiator class to allow sessions > to be *reconfigured* while the engine is running? Essentially, I'd > like to be able to pass a new SessionSettings to the Intiiator at > runtime and then any Sessions which are started/restarted after this > point will use these updated settings. This would primarily be for > changing things like the host and port on the connection intra-day if > required (e.g. some sort of failover scenario). > > To implement this I think I'd just add a new Initiator::reconfigure > method which would re-initialize the m_settings member and then call > onConfigure. > > -- > Caleb Epstein > caleb dot epstein at gmail dot com > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |