Child pages
  • Configuring Session Failover
Skip to end of metadata
Go to start of metadata

QuickFIX/J supports failover in both the initiators and acceptors. On the initiator side, multiple connections can be configured. If a connection fails, the initiator will try the next connection until it is able to reconnect. On the acceptor side, a session can be configured to reload it's session state before a logon is processed. In a failover scenario, the active session might be updating a persistent session state that can be accessed by the backup session when failover occurs.

Initiator Configuration

The following configuration shows how to configure multiple initiator
connections.

[default]
FileStorePath=examples/target/data/banzai
BeginString=FIX.4.2
ConnectionType=initiator
StartTime=00:00:00
EndTime=00:00:00
HeartBtInt=30
ReconnectInterval=5

[session]
SenderCompID=BANZAI
TargetCompID=EXEC
SocketConnectHost=localhost
SocketConnectPort=9876
SocketConnectHost1=localhost
SocketConnectPort1=9877

Acceptor Configuration

The acceptors must have access to shared session state. The state could be store
in a database or in a file accessible to both acceptors. The RefreshOnLogon
option in the following configuration will cause the acceptor to load the
session state when a login request is received. This allows a passive, backup
acceptor to continue a session correctly.

If you are running the acceptors on separate hosts, you could use the
following configuration file on each host. If you are configuring redundant
acceptors on the same host, you'll need to provide unique accept ports.

[default]
# JDBC store configuration, for example ...
BeginString=FIX.4.2
ConnectionType=acceptor
StartTime=00:00:00
EndTime=00:00:00
HeartBtInt=30
SocketAcceptPort=9877

[session]
SenderCompID=EXEC
TargetCompID=BANZAI
RefreshOnLogon=Y
  • No labels