This page sets out the key aspects of establishing and managing sessions between a Whisperer Enterprise Client and a Feed Handler.


Logon

A FIX session is only fully established when the following stages are complete:


Authentication & Authorization

When the Client requires a new session with a Venue, it must first establish a TCP socket connection with the  Whisperer Logon Service on a single, standard IP address and port - no matter the User, Session type, or Venue. Once connected, it must then send a Logon message specifying the desired session.

The Logon Service is responsible for the following functions:


Should either of these checks fail,  the Logon Service will terminate the connection without a Logout message.

In this event, the Customer should contact MF Support in order to confirm the validity of the specified credentials.


Otherwise the Logon Service will hand off the connection to the target Feed Handler. From this point on, the Client is communicating directly with the Feed Handler itself,  neither the LogonService, nor any other processes are involved.

Message Persistence

All Whisperer Enterprise messages are exchanged over TCP, with connectivity maintained directly between the Client and FH - so message delivery and ordering are both guaranteed, whilst the socket connection is operating correctly.

A message is deemed to have been sent, and received, successfully when:


The MF FH guarantees persistence of sent outbound messages for possible resend for a minimum period of three heartbeat intervals, allowing for detection of dead connections as per Session Monitoring, below.


Any unsent messages will be persisted indefinitely until either:



The table below specifies what messages are to be persisted and resent when necessary, as opposed to being gap-filled:


MessageSent ByReceived ByPersisted
LogonClient (Both)Feed HandlerNo
LogonResponseFeed HandlerClient (Both)No
LogoutClient (Both)Feed HandlerNo
LogoutResponseFeed HandlerClient (Both)No
SequenceResetGapFillClient (Both)Feed HandlerNo
Feed HandlerClient (Both)No
HeartbeatClient (Both)Feed HandlerNo
Feed HandlerClient (Both)No
TestRequestClient (Both)Feed HandlerNo
Feed HandlerClient (Both)No
SecurityStatusFeed HandlerClient (TAKER)No
UserRequestClient (Both)Feed HandlerNo
UserNotificationFeed HandlerClient (Both)No
ErrorReportFeed HandlerClient (Both)Yes
MarketDataRequestClient (Both)Feed HandlerNo
MarketDataRequestRejectFeed HandlerClient (Both)No
MarketDataIncrementalRefreshFeed HandlerClient (Both)No
QuoteRequestClient (TAKER)Feed HandlerOptional
Feed HandlerClient (MAKER)Yes
QuoteClient (MAKER)Feed HandlerNo
Feed HandlerClient (TAKER)No
MassQuoteClient (MAKER)Feed HandlerNo
Feed HandlerClient (TAKER)No
QuoteResponseClient (MAKER)Feed HandlerOptional
Feed HandlerClient (TAKER)Yes
Client (TAKER)Feed HandlerOptional
Feed HandlerClient (MAKER)Yes
NewOrderMultilegClient (Both)Feed HandlerOptional
Feed HandlerClient (MAKER)Yes
OrderCancelReplaceRequestClient (Both)Feed HandlerOptional
OrderCancelRequestClient (Both)Feed HandlerOptional
OrderCancelRejectFeed HandlerClient (Both)Yes
OrderTimeoutFeed HandlerClient (Both)Yes
ExecutionReportClient (MAKER)Feed HandlerYes
Feed HandlerClient (TAKER)Yes
ExecutionAckClient (TAKER)Feed HandlerOptional
Feed HandlerClient (MAKER)Yes


It will be noted that that all  messages that represent stateful events are persisted and resent by the MF FH - but only these. It is the responsibility of the Client application to determine the appropriate response.

For sequence gaps identified on the outbound Client Session, it is entirely the responsibility of the Client application to determine which message types are to be persisted for possible resend. This is typically most important for Maker clients accepting or rejecting orders against Taker Venues, but other scenarios may need to be considered.

User Session Synchronisation

Whisperer Enterprise utilises the 'new' model of session synchronisation introduced in FIX 4.4. This ensures that each side can expect any sequence number gaps to be filled automatically, eliminating the need for ResendRequest messages - and the problems that historically accompany these.


The MFAPI Client initiates a new session with a Logon message - populating NextExpectedMsgSeqNum which contains the next msgSeqNum value that the Client expects to receive from the Whisperer Feed Handler. 

The Whisperer Feed Handler validates the sequence number value as expected by the MFAPI Client as follows:



The mutual exchange of TestRequest and Heartbeat (response) messages are required as verification that no sequence number gaps remain.

The MFAPI Client should only proceed with new messages after it has sent the Heartbeat sent in response to the Whisperer Feed Handler TestRequest.




Erroneous Scenarios

Second Logon to Existing Session

Any attempt by the Client to send a Logon message on an existing session that it established previously will result in the session being aborted.

Second Session for User/SessionType/Venue

Should the Client attempt to establish a second  (additional) session using the same credentials as of a currently-active Client session, then it will be rejected. The original session will be unaffected.



 

Session Monitoring

Active sessions are monitored at the application level by each party via Heartbeat and TestRequest messages. Indications of problems must result in the monitoring party aborting the session.


MaxTx

For inbound Heartbeat and TestRequest messages sent by the Client , the FH will allow a fixed maximum allowed message transmission time (MaxTx), currently set to one second, before treating the message as 'missed'. This is used to allow for some degree of hysteresis WRT message delivery latencies.

The Client may specify it's own MaxTx value and logic when monitoring inbound messages sent by the FH.

In both cases only the local clock is used as reference.


Heartbeats

Once the Client has successfully established a session with the Whisperer Feed Handler (i.e. on dispatch of the first Heartbeat message in response to the end of synchronisation TestRequest), subsequent Heartbeat messages are sent by each party at the interval specified by the Client in it's Logon message.

Unlike standard FIX sessions, Heartbeat messages must be published as a metronome - no allowance should be made based on whether or not other messages are sent within each interval.


A heartbeat is deemed to have been missed if it is not received within HeartBtInt + MaxTx seconds and must result in the monitoring party issuing a TestRequest.


MF plans to utilise the Heartbeat message to periodically publish additional metrics to and from the server/Client :

  • performance metrics
  • additional identification information for human investigators
  • Etc.

This functionality will be made available via a backwardly-compatible schema change.




Test Request

TestRequest messages may be issued by either party and under normal circumstances result in a Heartbeat being sent in response, echoing the specified TestRequestID.


TestRequest messages may be used to obtain an approximate indication of message round-trip times between the MFAPI Client and the Whisperer Feed Handler.


If no Heartbeat response is received within HeartBtInt + MaxTx seconds of the issuance of the TestRequest, then the party must abort the session with a Logout message.




Logout

The recipient of a Logout message must echo it with a LogoutResponse (using it's next sequence number).


All messages received by the Whisperer Feed Handler (from either the Client or the Venue) between the exchange of Logout and LogoutResponse messages will result in ErrorReport messages being sent to the Client.

ErrorReport

The ErrorReport is a custom, user-defined, message used by the Whisperer Feed Handler to notify the Client when erroneous messages are received:

From Client

From Venue


Since there are scenarios where ErrorReport messages may not be delivered (e.g. during session abort sequences), these messages are persisted and will be delivered on reconnection.