2

I need to configure proxies for the Kinesis client. Currently I m using KinesisAsyncClient object for performing async operations on the kinesis stream. After a bit of a search over internet, I came to a conclusion that there is no proper resource which helps to configure proxies over async clients.

So is there any way we can configure the proxy host, port, username, password and non-proxy-hosts under the KinesisAsyncClient object.

Thanks in Advance!

1 Answers1

0

I am able to set Proxy host and port and pass to the KinesisAsyncClient using the following code:

    String hostString="127.0.0.1";
    int port=8080;
    ProxyConfiguration proxyConfiguration =ProxyConfiguration.builder().host(hostString).port(port).build();
    
    SdkAsyncHttpClient httpClient = NettyNioAsyncHttpClient.builder().proxyConfiguration(proxyConfiguration).build();
    

    KinesisAsyncClient client = KinesisAsyncClient.builder().httpClient(httpClient).build();

Please note I have set a sample hostString and Port.

Hope this helps.