How it works...
Since both Tomcat 9 and Spring 5 support asynchronous thread execution, request handlers can now return Mono<T> and Flux<T> data streams and receive automatic subscription with the client through the DispatcherServlet of Spring 5 platform. Conventionally, the @Controller can still programmatically execute the Flux<T> or Mono<T> cold stream through supplying the appropriate Supplier<T> to the stream's subscribe() method and wrapping the task and result in a Callable<T> for publishing. However, since Spring 5 understands full-blown reactive programming using Reactor Core, cold stream as well as hot stream can be published directly to the client. Thus, it can be concluded that the Spring 5 context fully understands reactive and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access