This repository breaks down learning of reactive types such as Mono and Flux. This repository contains examples using these reactive types in Spring5 Web Flux Framework
Reactor = single threaded event loop that receives and processes requests.
The reactor design pattern is an event handling pattern for handling service requests delivered concurrently to a service handler by one or more inputs. The service handler then demultiplexes the incoming requests and dispatches them synchronously to the associated request handlers.
| Endpoint | Description |
|---|---|
| /flux/strings | returns flux of strings created using Flux.just() |
| /flux/fromArray | returns flux of strings created using Flux.fromArray() |
| /flux/concat | returns flux of strings created using Flux.concat() |
| /flux/merge | returns flux of strings created using Flux.merge() |
| /mono/string | returns mono of type string Mono.just() |
| /mono/string/delay | returns flux of strings created using Flux.just() |
| /mono/doOnNext | returns flux of strings created using Mono.just().doOnNext() |
| /mono/int | returns flux of strings created using Mono.just() |
| /flux/user/one | returns flux of one user created using Flux.just() |
| /flux/user/many | returns flux of many users created using Flux.just() |
| /flux/fromIterable | returns flux of strings created using Flux.fromIterable() |
| /mono/user | returns mono of user using Mono.just(new User()) |
| /mono/toFlux | convert Mono to Flux by calling mono.flux() |
- Clone the repository
- Maven build
./mvnw clean install
- Run as spring boot app:
./mvnw spring-boot:run
References: