sample-spring-webflux
sample-spring-webflux copied to clipboard
testing webclient reactive communication with spring boot reactive application built on top of spring webflux
Spring WebFlux and Reactive WebClient Demo Project 
In this demo project you may examples of reactive endpoints built on top of Spring WebFlux, and using WebClient for calling other resources.
- Explaining different communication models in reactive application with Spring WebFlux. Differences between standard
application/jsoncontent type andapplication/stream+json. Introduction to back pressure term. Detailed description can be found here: Using Reactive WebClient with Spring WebFlux - A detailed analyse of threading and concurrency model used by Spring WebFlux and Reactor Netty. It also threats about
WebClientand Spring Boot Actuator pooling. A detailed description can be found here: A Deep Dive Into Spring WebFlux Threading Model
Guide
Required:
- JDK 11+
- Maven
How to run ?
mvn clean install
There are two JUnit tests: PerformanceSpringWebFluxTest and SampleSpringWebFluxTest.
To provide some standalone tests just run the main class SampleSpringWebFluxApp.
For generating some traffic to the application run application SendingApp. It runs MockWebServer on localhost:8082 in order to mock downstream service called by WebClient and than calls endpoints exposed by the application usung TestRestTemplate.