So, to build an entirely reactive application, we need a repository that operates not with collections of entities, but rather a repository that operates with reactive streams of entities. A reactive repository should be able to save, update, or delete entities by consuming not only an Entity itself but also by consuming a reactive Publisher<Entity>. It should also return data through reactive types. Ideally, when querying the database, we would like to operate with data repositories in a similar way to WebClient in the Spring WebFlux module. Indeed, the Spring Data Commons module provides the ReactiveCrudRepository interface with such a contract.
Now, let's discuss what benefits we may expect when using a reactive data access layer instead of a usual blocking one. Chapter 3, Reactive Streams - the New Streams...