Spring WebFlux consumes external data non-blockingly using WebClient, whose responses are handled as reactive Mono/Flux streams so the calling thread is never blocked waiting on I/O.
Fetching a stream of stock price updates with WebClient returns a Flux<PriceUpdate> that the application can filter for a specific symbol and map into a display format as each update arrives, without ever pausing the thread to wait.
public Flux<PriceUpdate> streamPrices(String symbol) {
return webClient.get()
.uri("/prices/stream")
.retrieve()
.bodyToFlux(PriceUpdate.class)
.filter(p -> p.getSymbol().equals(symbol));
}A concise interview answer is
I'd use WebClient's non-blocking get().retrieve() and map the response into a Mono or Flux depending on whether I expect one item or a stream. From there, operators like map and filter let me process the data reactively as it arrives, keeping the whole pipeline non-blocking end to end.
Last updated: 11 November 2026
Previous question: How would you implement efficient handling of large file uploads in a Spring Boot REST API, ensuring that the system remains responsive and scalable?
Next question: You need to build a REST API in Spring Boot for managing user data. How would you structure the application?