...when it's needed
In short: we should never block! But sometimes we just cannot avoid blocking calls... For instance, when we have to use library which hasn't reactive non-blocking support, and maybe even not planed to be reactive, legacy libraries, JDBC, ThreadLocal, etc...
- use reactor-tools
- use BlockHound
- bad: create separate microservice, which will call blocking one
- good: perform all blocking calls in a separate thread provided by special defined scheduled
- start apps:
jdk11 ; ./mvnw -f mongo spring-boot:run jdk11 ; ./mvnw -f name-service spring-boot:run
- execute all REST API calls from api.http file