-
Notifications
You must be signed in to change notification settings - Fork 38.8k
WebClient retry() doesn't re-run filters #23909
Copy link
Copy link
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: backportAn issue that is a backport of another issue to a maintenance branchAn issue that is a backport of another issue to a maintenance branchtype: enhancementA general enhancementA general enhancement
Milestone
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: backportAn issue that is a backport of another issue to a maintenance branchAn issue that is a backport of another issue to a maintenance branchtype: enhancementA general enhancementA general enhancement
Type
Fields
Give feedbackNo fields configured for issues without a type.
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.DefaultWebClientseems to run all the filters synchronously, including generating the URL. ThenDefaultExchangeFunctioncallsClientHttpConnection. 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