We have previously mentioned that there are a lot of patterns and programming techniques that are capable of becoming building blocks for the reactive system. For example, callbacks and CompletableFuture are commonly used to implement the message-driven architecture. We also mentioned reactive programming as a prominent candidate for such a role. Before we explore this in more detail, we need to look around and find other solutions that we have already been using for years.
In Chapter 1, Why Reactive Spring?, we saw that Spring 4.x introduced the ListenableFuture class, which extends the Java Future and makes it possible to leverage the asynchronous execution of operations such as HTTP requests. Unfortunately, only a handful of Spring 4.x components support the newer Java 8 CompletableFuture, which introduces some neat methods for asynchronous...