Hi,

Ok, solved. Instead of implementing a DNS resolver extending the 
SystemDefaultDnsResolver.

Thanks,
Joan.

-----Original Message-----
From: Joan grupoventus <joan.balagu...@grupoventus.com> 
Sent: Tuesday, July 2, 2019 3:57 PM
To: 'HttpClient User Discussion' <httpclient-users@hc.apache.org>
Subject: Question about DNSResolver

Hello,

We have an http pool that is shared by 2 apis:

- The api “A” load balances requests by IP address against a farm of internal 
servers. In this case we want to resolve the ip addresses by using an in memory 
dns resolver, and thus bypassing the JRE hostname resolution.

- The api “B” sends requests directly to an external endpoint by http protocol 
(http://domain/...). In this case we want to rely on the JRE hostname 
resolution.

Is there anyway to rely on JRE hostname resolution if the ‘resolve’ method does 
not find the hostname, instead of throwing a ‘UnknownHostException’? Or any 
chance to tell HttpClient to use our dns resolver only for certain kind of 
requests (in this case request from “A” api)?


Thanks,
Joan.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org

Reply via email to