scenarionscenario, the active session might be updating a persistent session state that can be accessed by the backup session when failover occurs.
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...
The following configuration shows how to configure multiple initiator
connections.
Code Block |
---|
[qfjdev:default] FileStorePath=examples/target/data/banzai BeginString=FIX.4.2 ConnectionType=initiator StartTime=00:00:00 EndTime=00:00:00 HeartBtInt=30 ReconnectInterval=5 [qfjdev:session] SenderCompID=BANZAI TargetCompID=EXEC SocketConnectHost=localhost SocketConnectPort=9876 SocketConnectHost1=localhost SocketConnectPort1=9877 |
...
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.
Code Block |
---|
[qfjdev:default] # JDBC store configuration, for example ... BeginString=FIX.4.2 ConnectionType=acceptor StartTime=00:00:00 EndTime=00:00:00 HeartBtInt=30 SocketAcceptPort=9877 [qfjdev:session] SenderCompID=EXEC TargetCompID=BANZAI RefreshOnLogon=Y |