...
# | Type | Pros | Cons | Recommend |
---|---|---|---|---|
1 | Future | Futures return value | Y | |
2 | Thread | threads does not return anything as the run() method returns void . We could possibly implement mechanism to trigger a response but this is unnecessary as futures do this | N |
RequestID Request ID Generation
...
Type | Method | Ease of implementation | Decision |
---|---|---|---|
UUID |
| Easy | ~ |
Custom | We generate our own (example exists in NCMP (notificationPublisher - confrm)) | Medium | - |
HTTP Request ID | Further investigation required | ~ | |
Kafka Event ID | Further investigation required | ~ |
...
Spring WebFlux is a web framework that’s built on top of Project Reactor, to give you asynchronous I/O, and allow your application to perform better. The original web framework included in the Spring Framework, Spring Web MVC, was purpose-built for the Servlet API and Servlet containers. The reactive-stack web framework, Spring WebFlux, was added later in version 5.0. It is fully non-blocking, supports Reactive Streams back pressure, and runs on such servers as Netty, Undertow, and Servlet 3.1+ containers.
We suggest that you consider the following specific points:
...
Pros | Cons |
---|---|
|
|
Links to materials:
https://www.baeldung.com/spring-webflux
...