{{Quickfixn}} Switching between Primary and Backup sessions

Кононов Роман Олегович rkononov at bcs.ru
Fri Feb 16 00:08:41 PST 2018


Hi,
Quickfix doesn’t let me to configure session like this:
[SESSION]
BeginString=FIX.4.4
SocketConnectHost1=<Primary>
SocketConnectPort1=<Primary>
SocketConnectHost2=<Backup>
SocketConnectPort2=<Backup>

Because it can’t find out value for “SocketConnectHost” (without <n>) in configuration, so I configured it like:
[SESSION]
BeginString=FIX.4.4
SocketConnectHost=<Primary>
SocketConnectPort=<Primary>
SocketConnectHost1=<Backup>
SocketConnectPort1=<Backup>

But as I remembered I had similar configuration earlier, and when primary address has become unavailable Quickfix doesn’t try to open backup session.
Anyways today will be a connection disaster imitation on a gateway we are targeting, so I can check if this configuration will work well, and let you know.

Thanks
Regards
Kononov Roman
Developer
BCS Technologies

From: Quickfixn [mailto:quickfixn-bounces at lists.quickfixn.com] On Behalf Of Mike Gatny
Sent: Wednesday, February 14, 2018 5:11 PM
To: Mailing list for QuickFIX/n <quickfixn at lists.quickfixn.com>
Subject: Re: {{Quickfixn}} Switching between Primary and Backup sessions

Yes, this is supported. Please see the SocketConnectPort<n> and SocketConnectHost<n> session settings here: http://quickfixn.org/tutorial/configuration.html

Your cfg file will end up looking something like:

[SESSION]
BeginString=FIX.4.4
SocketConnectHost1<Primary>
SocketConnectPort1<Primary>
SocketConnectHost2=<Backup>
SocketConnectPort2=<Backup>

And you can continue adding more as needed, e.g.:

SocketConnectHost3=<DisasterRecovery>
SocketConnectPort3=<DisasterRecovery>

You do not need to set SessionQualifier.

--
Mike Gatny
Connamara Systems, LLC

On Mon, Feb 12, 2018 at 11:36 PM, Кононов Роман Олегович <rkononov at bcs.ru<mailto:rkononov at bcs.ru>> wrote:
Hi! Our counterparty requires to recover gateway failover and provides Primary and Backup ip addresses and ports. Also specific behavior required.
So we’ve configured 2 initiator sessions:

[SESSION]
BeginString=FIX.4.4
SessionQualifier=PR
SocketConnectHost=<Primary>
SocketConnectPort=<Primary>

[SESSION]
BeginString=FIX.4.4
SessionQualifier=BCK
SocketConnectHost=<Backup>
SocketConnectPort=<Backup>

But with this configurations application trying to start both sessions. Is there any options in quickfix/n to set up behavior below:
Start only 1st session, if it’s unavailable to connect (3 attempts to connect) try to start 2nd session (3 attempts to connect). If 2nd session unavailable to then stop.

Regards
Kononov Roman
Developer
BCS Technologies


_______________________________________________
Quickfixn mailing list
Quickfixn at lists.quickfixn.com<mailto:Quickfixn at lists.quickfixn.com>
http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20180216/7d5547eb/attachment.htm>


More information about the Quickfixn mailing list