{{Quickfixn}} How do I force-disconnect FIX?
Rasheed Waraich
rashiedwaraich at gmail.com
Fri Mar 23 01:30:22 PDT 2012
Its not broken actually but I do agree that sometimes just calling the stop
without passing "true" doesn't wait for a disconnect... in past one of our
projects we have faced a similar issue and we had to call dispose (previous
version) to ensure the thread is shutdown...
Mike / Grant (from QuickFIX team) can better explain this in detail.
On Fri, Mar 23, 2012 at 9:05 AM, Thomas Tomiczek
<t.tomiczek at nettecture.com>wrote:
> Overlooked that.****
>
> ** **
>
> But then stop without true is broken, or? It does not even wait for a
> disconnect – so, it does not what name and expected standard .net behavior
> would imply?****
>
> ** **
>
> Regards****
>
> ** **
>
> Thomas****
>
> ** **
>
> *From:* quickfixn-bounces at lists.quickfixn.com [mailto:
> quickfixn-bounces at lists.quickfixn.com] *On Behalf Of *Rasheed Waraich
> *Sent:* Friday, March 23, 2012 8:54 AM
> *To:* Mailing list for QuickFIX/n
> *Subject:* Re: {{Quickfixn}} How do I force-disconnect FIX?****
>
> ** **
>
> Hi Thomas,
>
> One solution is to pass "true" in the stop method. It will forcefully
> close the session (logout).
> i.e.
> upPriceInitiator.Stop(true);****
>
> On Fri, Mar 23, 2012 at 7:51 AM, Thomas Tomiczek <
> t.tomiczek at nettecture.com> wrote:****
>
> I am asking because… calling Stop on an initiator does not work (data
> still flows in). At the same time, there is no dispose method there (should
> it not implement IDisposable? After all it has internal threads)?****
>
> ****
>
> I am creating for example a price link like that:****
>
> ****
>
> var upPricePath = Path.Combine(folder, "Fix.UpPrice.cfg");****
>
> SessionSettings upPriceSettings = new SessionSettings
> (upPricePath);****
>
> MessageStoreFactory upPriceStore = new FileStoreFactory
> (upPriceSettings);****
>
> LogFactory upPriceLog = new FileLogFactory(upPriceSettings);**
> **
>
> upPriceInitiator = new QuickFix.Transport.SocketInitiator(upPrice,
> upPriceStore, upPriceSettings, upPriceLog);****
>
> upPriceInitiator.Start();****
>
> ****
>
> Closing it like this:****
>
> ****
>
> upPriceInitiator.Stop();****
>
> upPriceInitiator = null;****
>
> ****
>
> does NOT result in for example the port of the FIX session being made
> available – this is bad. I need the ability to take down then re-establish
> initiators (for example to change the configuration file).****
>
> ****
>
> Also, when I have a long running request (request security definitions)
> then…. Well…. The data keeps pouring in.****
>
> ****
>
> So what is the best / standard method to FORCE logout an initiator? In my
> opionion:****
>
> ****
>
> · SocketInitiator should implement IDisposable properly,
> releaseing all unmanaged ressourcs. It is in fact a form error in FxCop to
> hold a reference to something that is IDisposable (socket) and not be
> disposable.****
>
> · Force-Logouts on Stop****
>
> · Release all ressources on Stop.****
>
> ****
>
> Regards****
>
> ****
>
> Thomas****
>
>
> _______________________________________________
> Quickfixn mailing list
> Quickfixn at lists.quickfixn.com
> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com****
>
>
>
>
> --
> //Regards
> Rasheed****
>
> _______________________________________________
> Quickfixn mailing list
> Quickfixn at lists.quickfixn.com
> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
>
>
--
//Regards
Rasheed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20120323/c9d6daae/attachment-0002.htm>
More information about the Quickfixn
mailing list