|
From: Christoph J. <chr...@ma...> - 2019-09-21 20:36:48
|
Hi, I assume this has more or less historic reasons. It is done the same way in the C++ implementation. The C# implementation also does not validate seqnums on reception of a Logout message. Another way to ensure that the seqnums are in sync is to send a TestRequest before Logout. That will trigger a Resend if seqnums are not in sync. Of course, this does only work when your side initiates the Logout. Cheers, Chris. On 19.09.19 18:20, Oleg Smirnov wrote: > QuickFIX/J Documentation:http://www.quickfixj.org/documentation/ > QuickFIX/J Support:http://www.quickfixj.org/support/ > > > > Hello, > > Could you please answer the question: > */Why the QuickFIX/J library doesn't validate MsgSeqNum when it receives a Logout message?/* > > It's very strange because according to *Page 13* of the FIX Transport protocol specification > <https://www.fixtrading.org/standards/fixt/> > > Sequence number checking is a vital part of FIX session management. However, a discrepancy in > the sequence number stream is handled differently for certain classes of FIX messages. > > In *ALL* cases except the Sequence Reset - Reset message, the FIX session should be terminated > if the incoming sequence number is less than expected and the PossDupFlag is not set. > A Logout message with some descriptive text should be sent to the other side before closing > the session. > > > Also, it says: > > *Sequence number mismatch in case of Logout message:* > If a message gap was detected, issue a ResendRequest to retrieve all missing messages followed > by a Logout message which serves as a confirmation of the logout request. DO NOT terminate > the session. The initiator of the Logout sequence has responsibility to terminate the > session. This allows the Logout initiator to respond to any ResendRequest message. > If this side was the initiator of the Logout sequence, then this is a Logout confirmation and > the session should be immediately terminated upon receipt. > The only exception to the “do not terminate the session” rule is for an invalid Logon > attempt. The session acceptor has the right to send a Logout message and terminate the > session immediately. This minimizes the threat of unauthorized connection attempts. > > > -- > Regards, > > Oleg > > > _______________________________________________ > Quickfixj-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfixj-users -- Christoph John Software Engineering T +49 241 557080-28 chr...@ma... MACD GmbH Oppenhoffallee 103 52066 Aachen, Germany www.macd.com Amtsgericht Aachen: HRB 8151 Ust.-Id: DE 813021663 Geschäftsführer: George Macdonald |