[
https://issues.apache.org/jira/browse/CAMEL-23345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18074811#comment-18074811
]
Claus Ibsen commented on CAMEL-23345:
-------------------------------------
So could it be that the http client is then waiting 3600 seconds until it
retries (and therefore appear to be hanging).
And yeah surely nobody want Camel to wait that long, so it may be that http
client need some kind of threshold value you can set to tell it if < X then
wait and retry, if > X then fail with 429 error
> 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
>
> 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)