|
From: Christoph J. <chr...@ma...> - 2019-07-26 10:41:22
|
Hi David, thanks for your problem description. I never used QFJ in a proxy scenario but what you describe makes sense to me. Please open a JIRA ticket for this or even better create a pull request with a proposed fix. :) https://github.com/quickfix-j/quickfixj/pulls Many thanks in advance and best regards, Chris. On 26.07.19 09:10, DAVID HERNANDO VIEITES via Quickfixj-users wrote: > QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ > QuickFIX/J Support: http://www.quickfixj.org/support/ > > > > Hi, everyone. > > We started using QFJ 2.1.1 recently and I think we found an issue with the use of failover hosts > through a proxy. > > We have a cfg file with this set up (just leaving the relevant pieces): > ProxyType=http > ProxyVersion=1.0 > ProxyHost=xyz > ProxyPort=8080 > ProxyUser=usr > ProxyPassword=pwd > > [SESSION] > SocketConnectHost=a.b.c.d > SocketConnectPort=5013 > # Alternative connection host > SocketConnectHost1=d.c.b.a > SocketConnectPort1=5013 > > If the connection to the first host in the list could not be established, the library is supposed > to move to the next one and try it on the next reconnection attempt. However, that doesn't seem to > be the case when a proxy is defined, because what I see is that the address being used is always > the first one. > > I think the issue may be within the IoSessionInitiator class. In particular in the > pollConnectFuture() method. When connecting through a proxy, the if statement is always not null > (assuming you're successfully connected to the proxy), so the nextSocketAddressIndex gets > constantly reset even if you couldn't reach the endpoint. > private void pollConnectFuture() { > try { > this.connectFuture.awaitUninterruptibly(2000L); if (this.connectFuture.getSession() !=null) { > this.ioSession =this.connectFuture.getSession(); this.connectionFailureCount =0; this.nextSocketAddressIndex =0; this.lastConnectTime = System.currentTimeMillis(); this.connectFuture =null; }else { > this.fixSession.getLog().onEvent("Pending connection not established after " + (System.currentTimeMillis() -this.lastReconnectAttemptTime) +" ms."); } > }catch (Throwable var2) { > this.handleConnectException(var2); } > > } > I was going to open a Jira ticket, but wanted to comment over here first. > > Many thanks! > > > > "Este mensaje está dirigido de manera exclusiva a su destinatario y puede contener información > privada y confidencial. No lo reenvíe, copie o distribuya a terceros que no deban conocer su > contenido. En caso de haberlo recibido por error, rogamos lo notifique al remitente y proceda a > su borrado, así como al de cualquier documento que pudiera adjuntarse. > > Por favor tenga en cuenta que los correos enviados vía Internet no permiten garantizar la > confidencialidad de los mensajes ni su transmisión de forma íntegra. > > Las opiniones expresadas en el presente correo pertenecen únicamente al remitente y no representan > necesariamente la opinión del Grupo BBVA." > > "This message is intended exclusively for the adressee and may contain privileged and confidential > information. Please, do not disseminate, copy or distribute it to third parties who should not > receive it. In case you have received it by mistake, please inform the sender and delete the > message and attachments from your system. > > Please keep in mind that e-mails sent by Internet do not allow to guarantee neither the > confidentiality or the integrity of the messages sent." > > > > _______________________________________________ > 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 |