https://github.com/piomin/sample-spring-webflux
testing webclient reactive communication with spring boot reactive application built on top of spring webflux
https://github.com/piomin/sample-spring-webflux
backpressure netty reactive-streams reactor spring-boot spring-webflux webclient
Last synced: 12 months ago
JSON representation
testing webclient reactive communication with spring boot reactive application built on top of spring webflux
- Host: GitHub
- URL: https://github.com/piomin/sample-spring-webflux
- Owner: piomin
- Created: 2019-10-31T15:26:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-05T02:31:05.000Z (12 months ago)
- Last Synced: 2025-03-05T03:26:08.601Z (12 months ago)
- Topics: backpressure, netty, reactive-streams, reactor, spring-boot, spring-webflux, webclient
- Language: Java
- Homepage: https://piotrminkowski.com/
- Size: 46.9 KB
- Stars: 30
- Watchers: 2
- Forks: 22
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## Spring WebFlux and Reactive WebClient Demo Project [](https://twitter.com/piotr_minkowski)
[](https://circleci.com/gh/piomin/sample-spring-webflux)
[](https://sonarcloud.io/dashboard?id=piomin_sample-spring-webflux)
[](https://sonarcloud.io/dashboard?id=piomin_sample-spring-microservices-new)
[](https://sonarcloud.io/dashboard?id=piomin_sample-spring-microservices-new)
[](https://sonarcloud.io/dashboard?id=piomin_sample-spring-microservices-new)
In this demo project you may examples of reactive endpoints built on top of Spring WebFlux, and using `WebClient` for calling other resources.
1. Explaining different communication models in reactive application with Spring WebFlux. Differences between standard `application/json` content type and `application/stream+json`. Introduction to back pressure term. Detailed description can be found here: [Using Reactive WebClient with Spring WebFlux](https://piotrminkowski.com/2019/11/04/using-reactive-webclient-with-spring-webflux/)
2. A detailed analyse of threading and concurrency model used by Spring WebFlux and Reactor Netty. It also threats about `WebClient` and Spring Boot Actuator pooling. A detailed description can be found here: [A Deep Dive Into Spring WebFlux Threading Model](https://piotrminkowski.com/2020/03/30/a-deep-dive-into-spring-webflux-threading-model/)
### Guide
Required:
1. JDK 11+
2. 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`.