Logout Initiator

Imported from previous forum

The FIX specifications states that FIX Client is the Session Initiator(Buy side) which sends Logon message to FIX Server(Sell side) to initiate a FIX Session. Is there anything in the FIX specification that prevents the Session acceptor(Sell side = FIX Server) from sending out Logout message to FIX Session Initiator(Buy side = FIX Client) to terminate the Session ? I am looking at the scenario where the Session End time has occurred and the Session initiator has not sent a Logout message. In

http://bit.ly/1yV7uHd

Cases 15 & 16 there is no clear indication of who can be the logout initiator. In

http://bit.ly/1wxI9NK

Introduction To FIX (The FIX Session Layer) by Jim Northey (slide 27 of 28), the terms used are Firm initiating Logout and Logout Recipient So my question is "Can Session acceptor (FIX Server) be logout initiator ?"

Regards, K. Mahesh

I see no reason why the logout cannot be initiated by a different party than the logon was initiated. The table header also use buy-side and sell-side only as examples, i.e. “Session Initiator (e.g. buyside)”. I believe cases 15 & 16 mentioned above intentionally omit language to limit the initiator of the logout to be the one who started the logon.

If the answer to your question were to be “no” then the session acceptor would be at the mercy of the other side to terminate the connection, or?

Hi Hanno Klien,

I am new to FIXProtocol and just curious

“cases 15 & 16 mentioned above intentionally omit language” why so ? should not the the FIX specs and testcases be unequivocally clear about this ?

Regards

Yes, agree, I guess it depends on the verbosity chosen by the volunteers at the time. BTW, the FIX Spec (Volume 2 prior to FIX 5 and FIXT spec thereafter) describes the case where the acceptor starts the logout due to an authentication failure. Maybe that is the clear answer you are looking for.

“If authentication fails, the session acceptor should shut down the connection after optionally sending a Logout message to indicate the reason of failure.”

In FIX_TestCase_SessionLevel20010710.doc titled “FIX Session-level Test Cases and Expected Behaviors”, located at

http://www.fixtradingcommunity.org/pg/file/fplpo/read/30489/fix-sessionlevel-test-cases-and-expected-behaviors

the sections

Buyside-oriented (session initiator) Logon and session initiation test case - page 8

Sellside-oriented (session acceptor) Logon and session initiation test case - page 9

is where session initiator == Buyside & session acceptor == Sellside is mentioned.

On page 5 of 25, Precedence 16 “Initiate Logout Process” is marked Y for both Session Initiator & Session Acceptor and states

[Start Quote]

Identify condition or reason to gracefully disconnect (e.g. end of “day”, no response after multiple TestRequest messages, too low MsgSeqNum, etc.). Send Logout message to counterparty. Wait a reasonable period of time for Logout response. During this time handle “new” inbound messages and/or ResendRequest if possible. Note that some logout/termination conditions (e.g. loss of database/message safe-store) may require immediate termination of the network connection following the initial send of the Logout message. Disconnect the network connection and “shutdown” configuration for this session.

[End Quote]

In FIX40.doc, section Logout page 11 of 69 uses the term “Logout Initiator” rather than buy side or sell side. So either side the session initiator or the acceptor can issue a Logout. Also in the FIX.4.0 etc. specs, they only use the terms Session-initiator (connects and sends Logon) & Session-acceptor (accepts connection and sends Reply Logon).

In FIXT.1.1 specs, in section Logon page 10 of 66 states

If authentication fails, the session acceptor should shut down the connection after optionally sending a Logout message to indicate the reason of failure. Sending a Logout in this case is not required because doing so would consume a sequence number for that session, which in some cases may be problematic.

But in FIXT.1.1 specs, In section “When to send a Logout vs. when to just disconnect” Page 37 of 66 states

[Start Quote]

In general a Logout message should always be sent prior to shutting down a connection. If the Logout is being sent due to an error condition, the Text field of the Logout should provide a descriptive reason, so that operational support of the remote FIX system can diagnosis the problem. There are exceptions, when it is recommended that a Logout message not be sent, these include:

* If during a logon either the SenderCompID, TargetCompID or IP address of the session initiator is invalid, it is recommended that the session be immediately terminated and no Logout message sent.  This login attempt might be an unauthorized attempt to break into your system; hence one does not want to divulge any information about one’s FIX system, such as: which SenderCompID/TargetCompID values are valid or which version of FIX is supported. 

* If during a Logon one receives a second connection attempt while a valid FIX session is already underway for that same SenderCompID, it is recommended that the session acceptor immediately terminate the second connection attempt and not send a Logout message.  Sending a Logout message runs the risk of interfering with and possibly adversely affecting the current active FIX connection.  For example, in some FIX system implementations, sending a Logout message might consume a sequence number that would cause an out of sequence condition for the established FIX session.  

[End Quote]

My understanding from security perspective is :- if Logon authentication fails, just disconnect without logout.