I am building a webclient with custom exchangefilter. This custom exchangefilter use reselience4j for load balancing stuff. I want to add webflux spring integration outbound gateway to send request and receive http response. Is there a way i can inject my custom webclient in spring webflux integration without impacting the functionality of exchangefilter?
Asked
Active
Viewed 109 times
1 Answers
1
The gateway has several constructors that take a WebClient
.
e.g.
/**
* Create a handler that will send requests to the provided URI using a provided WebClient.
* @param uri The URI.
* @param webClient The WebClient to use.
*/
public WebFluxRequestExecutingMessageHandler(String uri, @Nullable WebClient webClient) {
And, with the DSL
.handle(WebFlux.outboundGateway(uri, webCLient))
. ...
.get();

Gary Russell
- 166,535
- 14
- 146
- 179
-
Thanks Garry!! Is there any end to end example to implement outbound gateway for webflux integration? – ProblemSolver Oct 19 '22 at 21:02