Raymond created CAMEL-23345:
-------------------------------

             Summary: Https which returns HTTP Code 429 hangs
                 Key: CAMEL-23345
                 URL: https://issues.apache.org/jira/browse/CAMEL-23345
             Project: Camel
          Issue Type: Bug
          Components: camel-http
    Affects Versions: 4.19.0
            Reporter: Raymond


We use integration tests to test several http response code. One of to test 
return :


{code:java}
HTTP 429 too many requests.{code}

To test we use the following mock endpoint:

[https://mock.httpstatus.io/429]

You can use this in the browser and it works. It also worked on our Camel 
4.10.9 server. However, in later versions like 4.18.x and 4.19.0 the http 
request:


{code:java}
- to:
  uri: "https://mock.httpstatus.io/429{code}

I tried various options, but found out it's on lower level, in the HTTPClient5. 
Seems like it stalls when it's doing a TLS handshake (same url, but with http 
that returns a HTTP Code 301) works normally.

I was workaround it by disabling the retries done by the HTTPClient:


{code:java}
HttpComponent httpComponent =  context.getComponent("https", 
HttpComponent.class);
httpComponent.setHttpClientConfigurer(HttpClientBuilder::disableAutomaticRetries);
 {code}

This solves the issue us for us, but you may want to check it out, because it's 
maybe also an issue for others. Note I'm traveling coming days, so I am not 
able to follow the issues.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to