Details
Description
Hi,
A QuickFIX/J based application may miss a Logout request message, if the sender closes the socket shortly after sending the Logout request message. As result the application may lose important information about the reason of disconnection.
Most likely the reason of such behaviour of QuickFIX/J is such that the QFJ Message Processor stops processing queued messages as soon as it detects hasResponder() == false, which may happen even, if the input queue contains messages (or merely the Logout message). Basically the more loaded the receiver's machine is (in terms of CPU/IO) the more likely it is that it misses the Logout message.
Please note that even though the fromAdmin() callback is not called in such cases, the onLogout() is always called (because of the the closed socket). However, multiple occurrences of the same sender-side series of events (Logout + socket close) will lead to two different receiver-side behaviours on a random basis. In some cases the receiver will see the proper fromAdmin() callback and the onLogout() callback, while in some cases it will see only the onLogout() callback (triggered by socket close rather than by the incoming Logout message).
This has been an issue since 1.0.x, but only now I found some time to write a proper test.
Test code attached.
Regards,
Andrzej Hajderek