In the above case, webClient will be a Mono<String>, which hasn't been executed yet (since there's no subscription). We can gather multiple such "webclients" into an array, and execute all simultaneously by using Flux.merge, for example:
val webClients = ArrayList<Mono<String>>()
webClients.add(webClient) // usually called multiple times
Flux.merge( webClients ).subscribe{ e -> println(e) } //web calls done simultaneously here
The Spring WebClient is a reactive webclient. In general the workflow with webclient is (in kotlin):
In the above case, webClient will be a
Mono<String>
, which hasn't been executed yet (since there's no subscription). We can gather multiple such "webclients" into an array, and execute all simultaneously by using Flux.merge, for example: