- -- the very first logon message the client system sends for the week. Client systems must set their inbound and outbound sequence numbers to '1' prior to the Beginning of Week Logon for a successful logon.
- – used for any subsequent logons, after the beginning of the week. Following mid-week log off, the client system logs in mid-week with the next sequential outbound message sequence number.
- – used to reset sequence numbers while the client system is already logged on.
If there is a logon failure, the client system must reset the inbound and outbound sequence number to '1' until the client system establishes a successful Beginning of Week Logon.
The client system must submit the Logon message within 60 seconds after establishing a TCP/IP connection. If the client system does not submit the Logon message within 60 seconds, the TCP/IP socket connection is assumed to be stale and the socket is closed.
Beginning of Week Logon
The Beginning of Week(35=A) message must be populated with:
- Tag 49-SenderCompID with the Fault Tolerance Indicator set to 'N' for all customers. This tag is 7 characters long and consists of 2 sub-fields:
- Session ID (left-most 6 characters)
- Fault Tolerance Indicator (last trailing character)
- Tag 141-ResetSeqNumFlag = 'N'
- Tag 34-MsgSeqNum = '1'
The Session ID and Password are assigned and can be obtained by contacting your Global Account Manager.
The following diagram illustrates the message flow for a successful Beginning of Week logon scenario initiated by the client system.
The password submitted by the client system in tag 96-RawData is verified against the password associated with the Session ID.
If any of the requirements are not met or if Drop Copy is unable to authenticate the client system, the client system receives a(35=5) message and the connection is dropped. In addition, Drop Copy does not increment its inbound sequence number.
If authentication is successful, amessage is sent with a of 'N'.
After sending the Logon (35=A) message, Drop Copy sends a(35=1) message and the client system must respond with a (35=0) in response. The client application must receive the Logon Confirmation (tag 35-MsgType=A) message prior to sending the Heartbeat (tag 35-MsgType=0) message and any other subsequent messages.
Tag 141-ResetSeqNumFlag must be 'N' for Beginning of Week Logon message.
Sequence Numbers - If the client system outbound* sequence number is not reset to '1' prior to the Beginning of Week Logon, and the client system sends a Logon (tag 35-MsgType=A) message, the client is logged out. The logout message will have the following in tag 58-Text=Failed to reset sequence numbers at beginning of the week. Logout forced. The client must then reset sequence numbers and reattempt the logon.
Mid-Week Logon is used for any subsequent logon after a successful Beginning of Week Logon. The Mid-Week Logon uses a sequence number series that continues from the next sequence number where the client logged off or was disconnected.
As a result, the Mid-Week Logon cannot have a sequence number set to '1'. The requirements of Mid-Week Logon are similar to the Beginning of Week Logon except for the sequence number requirement.
The requirements on the Mid-Week Logon message are:
- Tag 49-SenderCompID with the Fault Tolerance Indicator set to 'N' for all Drop Copy customers.
- Tag 34-MsgSeqNo set to continue where the sequence left off at logout
- Tag 141-ResetSeqNumFlag set to 'N'
If any of the above requirements are not met, the client system receives amessage in response. In addition, Drop Copy does not increment its inbound sequence number.
Tag 141-ResetSeqNumFlag must be 'N' for Mid-Week Logon message. If the client system does not follow this requirement, the client system is logged out.
The following diagram illustrates the message flow for a successful Mid-Week Logon scenario initiated by the client system.
Mid-Week Logon provides handling for undelivered messages which were sent while the client system was logged out:
- While the client system is logged out, Drop Copy stores any messages to be sent to the client system.
- As a result, the client system may receive a message with a sequence number higher than expected due to the fact that Drop Copy processed those stored messages prior to the Mid-Week Logon message and incremented its outbound sequence number accordingly.
- The client system submits a message for messages stored while the client system was logged out. (35=2)
The following diagram illustrates the message flow for a Mid-Week Logon scenario where undelivered Execution Reports messages were generated by Drop Copy while the client system was logged out.
- The client system successfully logged on Tuesday morning and submitted messages.
- The client system logged out. While the client system is logged out, the orders remain active and any corresponding Execution Reports are generated. Drop Copy processes these Execution Reports and increments its outbound sequence number while the client system is logged out.
- The client system logs in on Wednesday morning. When the client system receives the Logon Confirmation (tag 35-MsgType=A) message, the client system detects that the sequence number of the Logon Confirmation (tag 35-MsgType=A) message is higher than expected. The client application follows up with a Resend Request (tag 35-MsgType=2) message and retrieves unsent messages that were generated while the client system was logged out.
The following diagram illustrates the message sequence for a Mid-Week Logon with unsent messages where the client system logs off and logs back on during mid-week.
In-Session Logon should only be used to recover from catastrophic failure.
The client system must send a Test Request (tag 35-MsgType=1) message before sending an In-Session Logon (tag 35-MsgType=A) message. If not sent in that order, the client system may lose messages that cannot be requested again as the sequence number may be reset to '1' for both parties, client and Drop Copy.
In-Session Logon is used to reset sequence numbers after the client has logged on. During In-Session Logon, tag 141-ResetSeqNumFlag is set to 'Y' to reset sequence numbers and tag 34-MsgSeqNum of that Logon must be set to '1'. If the client would like to reset sequence numbers in the middle of a session, the client should follow these steps:
- Send a message and wait for a (35=0) message to ensure that there are no sequence number gaps.
- Send a
message with tag 141-ResetSeqNumFlag set to 'Y' and a sequence number of '1' in tag 34-MsgSeqNum.
- If the client system sends an In-Session Logon (35=A) with tag 141-ResetSeqNumFlag set to 'N' or if the tag is missing, then the client system is logged out.
- In addition, if the client sends a sequence number other than '1' in tag 34-MsgSeqNum during In-Session Logon, the client system is logged out.
- Drop Copy responds with a message with tag 141-ResetSeqNumFlag set to 'Y' and a sequence number of '1' in tag 34-MsgSeqNum.
Drop Copy resets its inbound and outbound sequence numbers and the client's subsequent message must have a sequence number of '2'.
Do not use tag 141-ResetSeqNumFlag to recover from network disconnects during the week.
The following diagram illustrates a successful In-Session Logon scenario where the client system uses amessage and resets sequence numbers to '1' due to a catastrophic failure.