Questions tagged [apache-httpasyncclient]

HttpAsyncClient component of the Apache HttpComponents project.

92 questions
1
vote
0 answers

What's the difference between apache's RequestConfig and IOReactorConfig?

I was looking for a way to set custom timeouts in HttpAsyncClients, and googling gave me two ways - using RequestConfig or IOReactorConfig. Both seem similar and I could not find much explanation about what each of these are.
Noam Musk
  • 47
  • 1
  • 5
1
vote
1 answer

ArrayStoreException making a post using apache httpasyncclient

Actually client resides in tomcat 8080 & REST API resides in 9090. The URL's will be different when it moves to higher environments. I don't see a call happening to the REST API with httpasyncclient. I copied the code from Apache…
user525146
  • 3,918
  • 14
  • 60
  • 103
1
vote
2 answers

OutOfMemoryError with elasticsearch REST Java client via apache http nio

We are using the elasticsearch REST Java client (we are on Java 7 so can't use the normal elasticsearch Java client) to interact with our elasticsearch servers. This all works fine except for when we are trying to do an intial indexing of about 1.3m…
Ben
  • 1,922
  • 3
  • 23
  • 37
1
vote
1 answer

NoSuchMethodError in spark submit

I submitted my jar with dependencies to spark using spark-submit. In main method of my jar I want to create HttpAsyncCliens instance and execute some request (apache http async client library): val httpClient =…
Cortwave
  • 4,747
  • 2
  • 25
  • 42
1
vote
0 answers

Prevent Apache httpcore from slow denial of service attack

I am using apache httpcore library to listen for http requests as below. IOReactorConfig config = IOReactorConfig.custom() // Create instance of a custom Builder .setTcpNoDelay(true) // // Enable/disable…
1
vote
1 answer

How do you consume http response content asynchronously with Apache's HTTP async client?

I'm new to Java NIO. I'm using it to make HTTP Get requests. The requests executes properly, but I am unable to figure out how to get the content of the response. For example, CloseableHttpAsyncClient httpClient =…
Karan Tibrewal
  • 467
  • 1
  • 5
  • 4
1
vote
0 answers

non blocking writes between listeners

I'm reading an http response using the apache async client. Every time I read a chunk of data I want to write it to the servletoutputstream in a non-blocking mode. Something like this: // decoder.read is executed when data available for…
JBalaguero
  • 181
  • 2
  • 13
1
vote
1 answer

How to disable compression handling in Apache HttpAsyncClient

When creating a normal CloseableHttpClient I can disable compression (and redirections) by doing httpclient = HttpClients.custom() .disableRedirectHandling() .disableContentCompression() .build(); This way I…
1
vote
0 answers

HttpAsyncClient direct memory leak?

I use Apache httpasyncclient 4.1, in jconsole, I found that direct memory is continuously growing, I tried force gc, do not work. And what confused me is that I do not use DirectByteBufferAllocator. ManagedNHttpClientConnectionFactory connFactory =…
0
votes
0 answers

No tunnel Unless connected

I have an app that for a library needs to run on JDK 1.8_252, using Spring 2.3.x with Spring Webflux for WebClient and Apache HttpCore5, I have the following setup: @Slf4j @Configuration public class WebClientConfig { @Autowired private…
0
votes
0 answers

Caused by: java.net.NoRouteToHostException: No route to host using apache http client

What I am trying to achieve: Send a high volume of http requests to a third party server Issue: Intermittently, I am facing this issue I am having a hard time understanding. Again, this is intermittent only. 2023-05-16 08:33:01 1 DEBUG --- [main]…
PatPanda
  • 3,644
  • 9
  • 58
  • 154
0
votes
1 answer

Java MTLS implementation doesn't pick any certificate from keystore when using with a connection pool

I'm trying to implement a MTLS communication for a Java client application with a Nginx server. Both the server and client are configured with self generated key pairs. Server public certificate is added to the client trustore and the client's…
Thamindu DJ
  • 1,679
  • 4
  • 16
  • 29
0
votes
1 answer

Java: Http request with different Host Header and destination

I need to make an HTTP request with specific Host header that may differ from destination address. What are my options? Let's say we have these variables already defined. String host = "https://example.com/something"; String destination_address =…
netcat_dd
  • 27
  • 6
0
votes
0 answers

HttpAsyncClient streaming a file download gives exception java.nio.BufferUnderflowException

I am trying to write a proxy that downloads the file from a service and streams the responses back to the client. And I am getting this Exception at future.get() call. I am receiving the response buffer back in the consumer as I see it in logs but I…
Ravi Dasari
  • 453
  • 1
  • 4
  • 10
0
votes
0 answers

Apache HttpAsyncClients DeadlineTimeoutException after several days of working application

I have Kinesis Analytics application running with Flink and use external Flink Sink object to transfer data with Apache HttpAsyncClients. The below code is working fine for some time. override def open(): Unit = { uuid = randomUUID.toString …