如何配置SenderCompId以进行quickfix自动故障转移配置?

时间:2017-03-02 16:12:13

标签: quickfix quickfixj

在QuickFix / J中,有如下所示的启动器自动故障转移配置:

SocketConnectHost=localhost1
SocketConnectPort=9876
SocketConnectHost1=localhost2
SocketConnectPort1=9877

在上面,可以提供备用IP或端口,如SocketConnectHost n 和SocketConnectPort n 。但上面是会话故障转移机制,因为SenderCompID和TargetCompID是相同的。

有没有办法配置SenderCompID以及socketConnect主机和端口?

1 个答案:

答案 0 :(得分:1)

是的,您只需在新会话下设置,有点像:

[default]
ReconnectInterval=5
StartTime=00:00:00
EndTime=00:00:00
HeartBtInt=60
ReconnectInterval=60
ResetOnLogon=Y
DataDictionary=FIX.4.4.xml
UseDataDictionary=Y
ValidateFieldsOutOfOrder=N

[session]
BeginString=FIX.4.4
SenderCompID=Sender1
TargetCompID=Target1
SocketConnectPort=1201
SocketConnectHost=1.2.3.4
FileStorePath=store1
FileLogPath=log1
ConnectionType=initiator

[session]
BeginString=FIX.4.4
SenderCompID=Sender2
TargetCompID=Target2
SocketConnectPort=1202
SocketConnectHost=1.2.3.5
FileStorePath=store2
FileLogPath=log2
ConnectionType=initiator

[session]
BeginString=FIX.4.4
SenderCompID=Sender3
TargetCompID=Target3
SocketConnectPort=1203
SocketConnectHost=1.2.3.6
FileStorePath=store3
FileLogPath=log3
ConnectionType=initiator