HttpAsyncClient component of the Apache HttpComponents project.
Questions tagged [apache-httpasyncclient]
92 questions
                    
                    32
                    
            votes
                
                4 answers
            
        java.lang.IllegalStateException: Request cannot be executed; I/O reactor status: STOPPED
I have a service that is expected to execute requests at ~5 or more requests/min. This service depends on Apache AsyncHttpClient. After every few minutes, the clients hits some condition which causes java.lang.IllegalStateException: Request cannot…
         
    
    
        knash
        
- 369
- 1
- 4
- 8
                    11
                    
            votes
                
                0 answers
            
        Apache ConnectionClosedException: Connection closed,HttpAsyncRequestExecutor.endOfInput(HttpAsyncRequestExecutor.java:344)
we have three applications A,B and C deployed on same tomcat server.There is an HTTP call that happens between A to B(REST CALL) and Another http call from B to C(REST CALL)
We were using synchronous HTTP call initially,recently we changed our code…
         
    
    
        svs teja
        
- 957
- 2
- 22
- 43
                    7
                    
            votes
                
                1 answer
            
        Unable to set Socket Timeout less than 1000 milliseconds in RequestConfig (Apache HTTP async client 4.1.2)
Following is my code
       RequestConfig requestConfig = RequestConfig.custom()
                .setSocketTimeout(100)
                .setConnectTimeout(100)
                .setConnectionRequestTimeout(100).build();
       …
         
    
    
        Rahul Shandilya
        
- 126
- 1
- 6
                    7
                    
            votes
                
                1 answer
            
        How does HttpAsyncClient 4 work?
In previous versions of HttpClient target host was set up into client itself. In last version (for HttpAsyncClient it's 4.1.1) host is set up into HttpRequest (HttpGet, HttpPost etc.) every time I do a request.
I want to use persistent connection,…
         
    
    
        coolguy
        
- 3,011
- 2
- 18
- 35
                    6
                    
            votes
                
                1 answer
            
        Performance: Apache HttpAsyncClient vs multi-threaded URLConnection
I am trying to choose the best approach for making a large number of http requests in parallel. Below are the two approaches I have so far:
Using Apache HttpAsyncClient and CompletableFutures:
try (CloseableHttpAsyncClient httpclient =…
         
    
    
        Erric
        
- 750
- 9
- 29
                    6
                    
            votes
                
                1 answer
            
        How to call multiple rest api parallel in Java?
What is the best way to call multiple api parallel in Java? I want to do multiple rest calls, combine the results and return a jsonArray. I am using ExecutorService and get the correct output when i access the url from only one client pc. But when i…
         
    
    
        MUHAMMED IQBAL PA
        
- 3,152
- 2
- 15
- 23
                    6
                    
            votes
                
                1 answer
            
        PoolingNHttpClientConnectionManager: what is timeToLive attribute for?
I am trying to understand how does timeToLive attribute work?
Is this when you get a connection out of the pool, the time interval after which the connection is deliberately closed and returned to the pool?
API
I want my client that was using…
         
    
    
        jagamot
        
- 5,348
- 18
- 59
- 96
                    5
                    
            votes
                
                2 answers
            
        Getting this error out of a sudden java.lang.IllegalStateException: Request cannot be executed; I/O reactor status: STOPPED
I'm using httpcore-nio-4.4.5.jar. I'm using the elasticsearch RestHighLevelClient to interact with our elasticsearch servers. This all works fine except for some time we get I/O reactor stopped error out of a sudden. 
Everything seems fine on ES…
         
    
    
        Harshit Gupta
        
- 335
- 2
- 14
                    5
                    
            votes
                
                1 answer
            
        IllegalArgumentException: "Auth scheme may not be null" in CloseableHttpAsyncClient
I'm running some asynchronous GET requests using a proxy with authentication. When doing HTTPS requests, I'm always running into an exception after 2 successful asyncronous requests:
java.lang.IllegalArgumentException: Auth scheme may not be…
         
    
    
        Martin
        
- 51
- 4
                    5
                    
            votes
                
                1 answer
            
        set number of retries with HttpAsyncClients
With the typical HttpAsyncClients example:
public class AsyncClientHttpExchange {
    public static void main(final String[] args) throws Exception {
        CloseableHttpAsyncClient httpclient = HttpAsyncClients.createDefault();
        try {
    …
         
    
    
        John Fadria
        
- 1,863
- 2
- 25
- 31
                    5
                    
            votes
                
                3 answers
            
        Pass context to async Logger
I am trying to log raw request/response from a http client.
I am following log4j2 configurations from these logging instructions.
HttpAsync Client Dependency :- httpasyncclient (version 4.1.1)
log4j2.xml
        
            
            
                
                    
    
    
         
    
    
                
            
        
    
 
    
    
        Potato_head
        
- 336
- 1
- 4
- 15
                    5
                    
            votes
                
                1 answer
            
        HTTP client for throughput - Netty vs Apache HttpAsyncClient
I'm interested in executing about 50 HTTP requests/second from a single machine. I don't care so much about latency but I do care about throughput.
I'm trying to decide whether to use Apache HttpAsyncClient or use Netty. Could someone shed some…
         
    
    
        Gideon
        
- 2,211
- 5
- 29
- 47
                    4
                    
            votes
                
                1 answer
            
        How to do Http2 correctly with Apache HttpCient-5 Beta
HI I m trying to write a client that makes http2 request to multiple servers(which already supports http2). so far I have written this standalone program which works fine that I can see all requests goes via same tcp connection(verified with the…
         
    
    
        Zyber
        
- 428
- 4
- 21
                    4
                    
            votes
                
                0 answers
            
        Get Gziped content from CloseableHttpAsyncClient
I am working in an environment where I am currently required to only use apache hc libraries. More specifically,
    
        org.apache.httpcomponents 
        httpasyncclient 
       … 
         
    
    
        Akshay Patil
        
- 611
- 1
- 10
- 23
                    3
                    
            votes
                
                0 answers
            
        Migration from HTTPAsyncClient to HTTPClient5 - Replacement for PoolingNHttpClientConnectionManager? and how to set Socket timeout on RequestConfig?
I am migrating from HTTPAsyncCLient to HTTPCLient5 to make use of the HTTP/2 support that comes with it.
We used to use PoolingNHttpClientConnectionManager as our connection manager but it is no longer available. I was wondering what the best…
         
    
    
        Srijan Srivastav
        
- 41
- 3