Open pcdv opened 8 months ago
Reading #361 (Don't revert ownership of offline sessions to the Engine in Sole Library mode) seems to indicate that this is a bug.
I have the same confusion. The existing tcp connection will not be released when the sole library is disconnected, but will be taken over by the Gateway Library. As a result, SessionProxy cannot track all outbound messages. I'm wondering whether to put Engine and Library in the same process and release the engine's tcp connection in the library disconnect callback.
FYI this is what I do: several processes embed their own engine + library, even though that is not the original philosophy behind artio (and is heavier in terms of processing).
Nevertheless, disconnections between engine and library due to timeout can still happen. I've seen it in two scenarios:
I'm wondering whether I should take care of closing all sessions from the library before shutting down the engine, to avoid the risk of having sending uncontrolled outbound messages because of this issue.
In issue #503, another example of message (SequenceReset) sent without going through SessionProxy.
In case of library timeout, the Framer acquires the sessions of the library. Once acquired, messages can be sent to the session without going through the library (e.g. Heartbeat or Logout).
When using SOLE_LIBRARY mode, this seems counter-intuitive:
Even without SOLE_LIBRARY, this is problematic when one needs to control the sending of FIX messages through a SessionProxy (known only at library level): it the library times out, messages will be sent circumventing the SessionProxy.
The problem with this is that it becomes impossible to keep track of sent MsgSeqNum in a clustered solution.
A configuration parameter should allow to prevent the engine from autonomously sending messages to sessions.