Reputation: 5649
In QuickFix/J there is configuration for auto failover for initiator like below:
SocketConnectHost=localhost1
SocketConnectPort=9876
SocketConnectHost1=localhost2
SocketConnectPort1=9877
In above alternate ip or port can be provided like SocketConnectHostn and SocketConnectPortn. But above is a session failover mechanism since SenderCompID and TargetCompID are same.
Is there a way by which I can configure the SenderCompID along with socketConnect host and port?
Upvotes: 1
Views: 1369
Reputation: 3328
Well yes you simply setup under a new session, kind of like so:
[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
Upvotes: 1