In this tutorial we are going to learn how microservices communicate with each other in asynchronous fashion. In asynchronous communication calling microservice will not wait till the called microservice responds. This pattern can be achieved with message bus infrastructures like Kafka.Here we use Spring Cloud Stream framework to communicate with message bus.
Overview
When report-api microservice receives a request to get employee details it is going to fetch details and write results to message bus.
Mail microservice listens on the bus for employee details and when those details are available on bus. It is going to read send SMS and email.
report-api play a role of Producer
mail-client microservice plays a role of Consumer
Kafka play a role of mediator or message bus
https://github.com/balajich/spring-cl...
In questa pagina del sito puoi guardare il video online Spring Cloud Session-4 Inter Microservice Communication ASynchronous using Kafka della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Balaji Sankar Chopparapu 18 settembre 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 4,013 volte e gli è piaciuto 71 spettatori. Buona visione!