OnixS C++ ICE Binary Order Entry Handler 1.2.3
API Documentation
Loading...
Searching...
No Matches

When the session is in the active state, and there are some network issues, the Handler will try to restore the connection per OnixS::ICE::BOE::SessionSettings::reconnectAttempts and OnixS::ICE::BOE::SessionSettings::reconnectInterval settings.

When a network error is detected, the session changes its state to OnixS::ICE::BOE::SessionStateId::Reconnecting and tries to re-establish the connection OnixS::ICE::BOE::SessionSettings::reconnectAttempts() times with the OnixS::ICE::BOE::SessionSettings::reconnectInterval() delays between attempts.

Reconnect Within the Same Trading Session

When a BGW session is reconnected during the same trading session, the Handler restores the transport connection and sends a new LogonRequest for the same BOE session. This is a session reconnect, not a full session reset.

Sequence Numbers

During reconnect within the same trading session:

  • the client-side outbound sequence number is preserved and used on the next outgoing LogonRequest;
  • the expected inbound sequence number is preserved in session storage;
  • the server-side outbound sequence numbers are expected to continue from the last value sent by BGW during the same trading session.

This matches the ICE technical specification for same-session reconnect behavior.

Logon Report Handling After Reconnect

After reconnect, the Handler waits for LogonReport and compares its sequenceId with the locally expected inbound sequence number.

  • If LogonReport.sequenceId() equals the expected inbound sequence number, the session continues immediately.
  • If LogonReport.sequenceId() is greater than the expected inbound sequence number, the Handler detects a gap and starts message recovery using ResendRequest.
  • If LogonReport.sequenceId() is 1, the Handler treats it as a new start and sets the next expected inbound sequence number to 2.

Recovery of Missed Messages

When a gap is detected, the session moves to OnixS::ICE::BOE::SessionStateId::WaitForRetransmission.

The Handler then:

  1. sends ResendRequest for the missing sequence range;
  2. processes retransmitted business messages marked with PossResend;
  3. processes SequenceReset messages to account for gap fill ranges;
  4. queues real-time messages that arrive while recovery is in progress;
  5. replays queued messages after the retransmission range is completed;
  6. returns to the previous state, which is normally OnixS::ICE::BOE::SessionStateId::Established.

Trader Logon

Reconnect of the BOE session does not automatically repeat trader logon.

If the application needs trader-level recovery, it should handle OnixS::ICE::BOE::Messaging::TraderLogonRequest explicitly and process the resulting OnixS::ICE::BOE::Messaging::TraderLogonReport messages as part of its reconnect workflow.

See Trader Logon for trader-level behavior and replay of GTC/GTD state.

Note
Reconnection works for established connections only.
See also
Message Sequence Numbers
Trader Logon
Scheduling Sessions for Automatic Connection