Drop Copy Session Layer - Logon

Drop Copy logon must follow the CME Globex Secure API Logon procedure. Once securely logged on, the following information is applicable to the Drop Copy session.

Client systems use the  Logon (tag 35-MsgType=A) message for authentication with Drop Copy. There are three Logon scenarios:

  • Beginning of Week Logon -- 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.

  • Mid-Week 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.

  • In-Session Logon – 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.

See also: Session Layer - Fault Tolerance for a discussion of setting the Fault Tolerance Indicator (FTI) at logon and failover scenarios.

Beginning of Week Logon

The Beginning of Week Logon (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 following diagram illustrates the message flow for a successful Beginning of Week logon scenario initiated by the client system.

If any of the requirements are not met or if Drop Copy is unable to authenticate the client system, the client system receives a Logout (35=5) message and the connection is dropped. In addition, Drop Copy does not increment its inbound sequence number.

If authentication is successful, a Logon (35=A) message is sent with a Fault Tolerance Indicator of  'N'.

After sending the Logon (35=A) message, Drop Copy sends a Test Request (35=1) message and the client system must respond with a Heartbeat (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.

 top

Mid-Week 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 a Logout message in response. In addition, Drop Copy does not increment its inbound sequence number.

The following diagram illustrates the message flow for a successful Mid-Week Logon scenario initiated by the client system.

 top

Mid-Week Logon and Undelivered Messages

Mid-Week Logon provides handling for undelivered messages which were sent while the client system was logged out:

  1. While the client system is logged out, Drop Copy stores any messages to be sent to the client system.

  2. As a result, the client system may receive a Logon (35=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.

  3. The client system submits a  Resend Request (35=2) message for messages stored while the client system was logged out.

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.

  1. The client system successfully logged on Tuesday morning and submitted New Order (35=D)  messages.

  2. 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.

  3. 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.

 top

In-Session Logon

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:

  1. Send a Test Request  message and wait for a Heartbeat (35=0) message to ensure that there are no sequence number gaps.

  2. Send a Logon (35=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.

  3. Drop Copy responds with a Logon (35=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'.

top

In-Session Logon Used to Reset Sequence Number

The following diagram illustrates a successful In-Session Logon scenario where the client system uses a Test Request message and resets sequence numbers to '1' due to a catastrophic failure.

 top




How was your Client Systems Wiki Experience? Submit Feedback

Copyright © 2024 CME Group Inc. All rights reserved.