WebClient retry() doesn't re-run filters #23909
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: backport
An issue that is a backport of another issue to a maintenance branch
type: enhancement
A general enhancement
Milestone
Calling
retry()
on aMono<>
produced by callingWebClient.exchange()
won't re-run the filters. This means any modifications made to the request by filters (like changing the URL for load-balancing purposes) won't be repeated.DefaultWebClient
seems to run all the filters synchronously, including generating the URL. ThenDefaultExchangeFunction
callsClientHttpConnection
. It's the http connection that does the actual connection asnychronously, producing aMono<>
. Specifically, filters get run when you callexchange()
orretrieve()
, not when you actually subscribe.Related: spring-cloud/spring-cloud-commons#579
The text was updated successfully, but these errors were encountered: