[
https://issues.apache.org/jira/browse/CAMEL-23345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18076992#comment-18076992
]
Raymond commented on CAMEL-23345:
---------------------------------
Yes, seems like the correct analysis, and seems the deliberate new behavior of
the httpClient library.
1. Probably setting this to 0 gets the old behavior back. It would be nice if
this can be set from the component / endpoint options.
2. Maybe it's also good to first update httpClient5 to the latest (currently
5.6.1):
[https://mvnrepository.com/artifact/org.apache.camel/camel-http/4.20.0/dependencies]
Just to be sure.
3. Note I also set the *logHttpActivity* to true. However, because it's in
waiting state, the activity is never logged. In cUrl the activity is mostly
broken down in several steps, then you can often see how far it gets, and at
which step it gets.
> 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
> Priority: Minor
> Fix For: 4.x
>
>
> 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)