OnixS C++ CME iLink 3 Binary Order Entry Handler  1.18.0
API Documentation
Message Sequence Numbers

Message Sequencing

Each iLink 3 Session establishes independent incoming and outgoing message sequence numbers series.

Sequence numbers are initialized at the start of an iLink 3 logical session, starting at 1 and incremented by each application-level message through the session.

A single iLink 3 logical session with the same Universally Unique Identifier (UUID) can exist across multiple sequential physical connections. The client can connect and disconnect multiple times while maintaining the same iLink 3 logical session.

Once the OnixS::CME::iLink3::Session::disconnect method is called, the physical connection is terminated, but the logical session does not end its lifetime. It is possible to continue the session later, using the OnixS::CME::iLink3::Session::connect method again.

fixp-session-sequence-numbers.gif
See also
Restoring Session State
Scheduling Sessions for Automatic Connection

Manipulating Message Sequence Numbers

To get the expected sequence number of the next incoming message, use the OnixS::CME::iLink3::Session::inSeqNum method.

To get the sequence number of the next outgoing message, use the OnixS::CME::iLink3::Session::outSeqNum method.

Resetting Sequence Numbers

Resetting inbound and outbound message sequence numbers back to 1, for whatever reason, constitutes the beginning of a new logical iLink 3 session that should have a new UUID. The OnixS::CME::iLink3::Session::reset method must be used to back up previous log files, generate a new UUID, and reset sequence numbers to 1.

Note
OnixS::CME::iLink3::Session::inSeqNum and OnixS::CME::iLink3::Session::outSeqNum methods can be used to set expected sequence numbers manually before an iLink 3 connection is established. However, it is NOT recommended to use these methods to reset the message sequence numbers back to 1 to start a new logical iLink 3 session. Instead, use the OnixS::CME::iLink3::Session::reset method.