B2BITS FIX Antenna C++ 2.33.0
|
FIX Antenna allows specifying the primary and backup connection for a session. The backup connection is used instead of the primary, when the latter is not available. Parameters of the backup connection are specified in the Engine::Session::connect() method. The session changes the primary connection to the backup (and back) when the Engine::Session::switchConnection() method is called. If the enableAutoSwitchToBackupConnection_ session parameter is enabled (refer to the Engine::SessionExtraParameters), the session changes the primary connection to the backup automatically after reconnect attempts exceed Reconnect.MaxTries. If the cyclicSwitchBackupConnection_ session parameter is enabled, the session automatically switches the primary connection to the backup and back in cycle.
The Engine::SessionExtraParameters::keepConnectionState_session parameter means that the session will continue using the current storage and values of the InSeqNum and OutSeqNum. Otherwise the new storage will be created and seqNums will be reset.
For example:
FIX Antenna follows two main rules:
There are two very important consequences of these rules, which in combination with FIX sequencing and retransmission make losing messages in FIX Antenna impossible:
Gap fill is a standard FIX mechanism for identifying and resolving message loss. It is based on sequencing messages in each direction, resend request mechanism, PosDup flag and sequence reset.
When the session identifies a "sequence number too high" problem it sends a resend request message asking for retransmission of lost messages. The opposite side resends requested messages with PosDupFlag set to "Y". Session level messages are not resent. The sequence reset is used to keep sequence numbers consistent during resending i.e. it is sent instead of session level messages or when messages to be resent are absent. The sequence reset gap fill message is used to skip a set of messages, it informs counterparty what sequence number to expect next.
FIX Antenna resolves the gap fill automatically, i.e. no manual work is required. However it is possible to intervene into the standard mechanism. The Engine::Application::onResend method is called each time an application level message is resent. It is possible to return "false" for those messages, which should not be resent; sequence reset will be sent instead.
FIX Antenna comes with a basis for failover. This means that if an application crashes FIX Antenna will fully restore its state after the next initialization as it was before crash. No information will be lost.