|
From: Browne, S. <Sam...@cm...> - 2020-07-14 07:31:24
|
Thanks Chris, Yea, it was the wrapping of the call to stateListener.onLogout(); inside the “if (logonReceived || logonSent)” block that meant it wasn’t guaranteed to be called, I’ve since moved the “cleanup” code into the stateListener.onDisconnect hook. Thanks, Sam From: Christoph John <chr...@ma...> Organisation: MACD Reply to: "chr...@ma..." <chr...@ma...> Date: Monday, 13 July 2020 at 15:56 To: "qui...@li..." <qui...@li...>, "Browne, Sam" <Sam...@cm...> Subject: Re: [Quickfixj-users] quickfix.Application.onLogout(SessionID) v quickfix.SessionStateListener.onLogout() Exercise Caution: This email is from an external source. Hi Sam, actually, both Application.onLogout() and SessionStateListener.onLogout() are similar in this case. You can see this here: https://github.com/quickfix-j/quickfixj/blob/655b3e459dfce0a0dbd42897619cc01d62a2a58b/quickfixj-core/src/main/java/quickfix/Session.java#L2074-L2081 Both callbacks have some overlaps, but SessionStateListener has some more network-level checks, e.g. you have callbacks onConnect() or onDisconnect() there. Personally I'd also implement the SessionStateListener.onDisconnect() callback to be able to get notified of every disconnection since onLogout() will only be called if the session was logged on before. This will not cover the case e.g. where a Logon has been sent and the connection drops right afterwards. Also see https://stackoverflow.com/questions/61868398/quickfix-j-how-to-detect-when-connection-fails Cheers, Chris. On 09.07.20 14:24, Browne, Sam wrote: QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ QuickFIX/J Support: http://www.quickfixj.org/support/ Hi, The Java doc for quickfix.Application.onLogout(SessionID) states: “This callback notifies you when an FIX session is no longer online. This could happen during a normal logout exchange or because of a forced termination or a loss of network connection.” Does the same apply to quickfix.SessionStateListener.onLogout() or does the separate quickfix.SessionStateListener.onDisconnect() method need to be implemented to handle the latter case of “forced termination or a loss of network connection” Thanks, Sam ________________________________ NOTICE: This message, and any attachments, are for the intended recipient(s) only, may contain information that is privileged, confidential and/or proprietary and subject to important terms and conditions available at E-Communication Disclaimer<http://www.cmegroup.com/tools-information/communications/e-communication-disclaimer.html>. If you are not the intended recipient, please delete this message. CME Group and its subsidiaries reserve the right to monitor all email communications that occur on CME Group information systems. _______________________________________________ Quickfixj-users mailing list Qui...@li...<mailto:Qui...@li...> https://lists.sourceforge.net/lists/listinfo/quickfixj-users -- Christoph John Software Engineering T +49 241 557080-28 chr...@ma...<mailto:chr...@ma...> MACD GmbH Oppenhoffallee 103 52066 Aachen, Germany www.macd.com<http://www.macd.com> Amtsgericht Aachen: HRB 8151 Ust.-Id: DE 813021663 Geschäftsführer: George Macdonald |