Suppose there is an ecommerce website which sells multiple products and there are multiple microservices which help this ecommerce website to provide best experience to its customers. Each microservice can handle a different work, suppose in case of a new order is placed one microservice can handle delivery related data another can handle installation of product etc. In case of each of these event occures we need to call respective microservice.
To handle that we will create an event bus which lets miltiple subscribers (microservices in this case) to subscribe for an event and publisher(ecommerce website in this case) to publish an event. Whenever publisher publishes an event Event Bus will notiify subscribers of that particular event.
To go through full design, below is the video. Subscribe our YouTube channel for more similar videos: