[
https://issues.apache.org/jira/browse/CXF-8725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17557032#comment-17557032
]
Konrad Windszus edited comment on CXF-8725 at 6/22/22 6:45 AM:
---------------------------------------------------------------
The proposed PR in https://github.com/apache/cxf/pull/964 allows to disable the
failover for 404 via
{code}
WebClient.getConfig(proxy).getRequestContext().put("org.apache.cxf.transport.service_not_available_on_http_status_codes",
"503,429");
{code}
(for JAXRS clients).
was (Author: kwin):
The proposed PR in https://github.com/apache/cxf/pull/964 allows to disable the
failover for 404 via
{code}
WebClient.getConfig(proxy).getRequestContext().put("org.apache.cxf.transport.service_not_available_on_http_404",
false);
{code}
(for JAXRS clients).
> Allow RetryStrategy to optionally not retry for HTTP 404 responses
> ------------------------------------------------------------------
>
> Key: CXF-8725
> URL: https://issues.apache.org/jira/browse/CXF-8725
> Project: CXF
> Issue Type: Improvement
> Components: Clustering, Transports
> Affects Versions: 3.5.2
> Reporter: Konrad Windszus
> Priority: Major
>
> Currently when using a {{org.apache.cxf.clustering.RetryStrategy}} with
> {{org.apache.cxf.clustering.FailoverFeature}} on a {{JAXRSClientFactory}} it
> will always retry in case of HTTP status codes 404, 503 and 429
> (https://github.com/apache/cxf/blob/master/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java#L1603-L1605).
> While this is reasonable to do always for the latter two a 404 could also
> indicate a regular ReST API response in case of invalid parametrisation.
> Therefore it should be possible to optionally disable retries for 404.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)