How to decide which style to choose?

Both approaches have their own merits and constraints. It is not possible to develop a system with just one approach. A combination of both approaches is required based on the use cases. In principle, the asynchronous approach is great for building true, scalable microservice systems. However, attempting to model everything as asynchronous leads to complex system designs.

This is what the the aforementioned example looks like in the context where an end user clicks on a UI to get profile details:

This is perhaps a simple query to the backend system to get a result in a request-response model. This can also ...

Get Spring 5.0 Microservices - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.