Mono is a Reactor publisher for an asynchronous computation that produces zero or one result. It represents work that another task can subscribe to, rather than a value returned directly. section 11.4
In a WebClient call, a Mono can supply the request body and represent the response. Linking these producers and consumers defines task dependencies without chaining work on a single thread. section 11.4
A payment request
A proxy sends Mono.just(payment) as the POST body and returns bodyToMono(Payment.class). WebFlux subscribes to the returned task; WebClient subscribes to the body task. section 11.4
Figure 11.10 The tasks chain in a reactive app. When building a reactive web app, we define the tasks and the dependencies between them. The WebFlux functionality, initiating the HTTP request, subscribes to the task we create through the producer the controller’s action returns. In our case, this producer is the one we get by sending the HTTP request with WebClient. For WebClient to make the request, it subscribes to another task that provides the request body.

Trace how the response task and request-body task depend on one another through subscriptions. section 11.4


