Murat,

On Thu, Aug 11, 2016 at 1:36 PM, Murat Balkan <murat.bal...@ericsson.com> wrote:
> Hi,
> I will send out more than 100 get requests to several sites. However, I'd 
> like to use different DNS Server settings for each of them. What is the most 
> efficient way of doing this?
>
> As long as I know the setDns function is only applicable to 
> PoolingHttpClientConnectionManager so do I need to create multiple connection 
> managers for each different DNS server?

You could look at implementing custom DnsResolvers [1] to use
different DNS server settings; and have a custom DnsResolver 'proxy'
set on the HttpClient [2] to delegate to your custom resolvers based
on whatever parameters you choose.

>
> Thanks
> Murat

Regards,
Bindul

[1] 
https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/conn/DnsResolver.html
[2] 
https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html#setDnsResolver(org.apache.http.conn.DnsResolver)

---------------------------------------------------------------------
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