|
From: Christoph J. <chr...@ma...> - 2021-03-27 00:31:51
|
Hi, unfortunately it is not possible to do this. The only thing I could think of at the moment is to configure two separate sessions, each with its own SocketConnectHost and do the failover between the two sessions in the application logic. Or simply let both run and CME reject one of the sessions when it tries to connect. The failover logic in QFJ only works when the connection is unsuccessful. However, by CME accepting the connection the logic is getting tricked. I think it would be not so difficult to change this. We could introduce a configuration which switches between the current behaviour (Next connection attempt after a successful connection will start at first defined connection again) and a round-robin one which cycles through the hosts regardless of whether the last connection was successful or not. Cheers, Chris. On 26.03.21 23:39, Andrew Gurinovich wrote: > QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ > QuickFIX/J Support: http://www.quickfixj.org/support/ > > > > Hi. > When you connect and try to LOGIN to secondary(backup) IP address for CME fix dropcopy while the > primary host is active, you are getting an LOGOUT: > > "8=FIX.4.2|35=5|49=CME|58=Backup session not allowed. Logout forced". > > You are supposed to failover to the other host then. > > We can handle the logout event in Application.fromAdmin, but i cant seem to find a way to failover > to another SocketConnectHost manually - the Session does not expose > IoSessionInitiator.getNextSocketAddress(where the address is updated). And even if it was exposed, > after the LOGOUT happens the initiator is recreated, starting with the same first SocketConnectHost. > > Is there a way to trigger a failover manually in fromAdmin method in the Application? > Thanks! > > > _______________________________________________ > Quickfixj-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfixj-users -- Christoph John Software Engineering T +49 241 557080-28 chr...@ma... MACD GmbH Oppenhoffallee 103 52066 Aachen, Germany www.macd.com Amtsgericht Aachen: HRB 8151 Ust.-Id: DE 813021663 Geschäftsführer: George Macdonald |