Event-driven architecture (EDA) is an architectural style where decoupled microservices can asynchronously exchange events as they occur via an event broker.
EDA is more loosely coupled than the client/server (request-response) paradigm because the component that sends the message doesn’t need to know the identity/existence of the receiving components at the time of compiling.
An event-driven architectural pattern can be implemented via RabbitMQ, Kafka, and IBM MQ message brokers for B2B service-to-service interactions to achieve the following goals,
- All the Inter-Process Communications (IPC) occurring over MQ (RabbitMQ Broker) within the boundary of microservices use it to replicate/relate the domain data.
- Reduce the amount of data exchanged between components. E.g. Front-end/BFF components are not required to send whole data to the micoservices on the subsequent calls if they have already made relevant calls as part of previous interactions.
- Achieve low latency and high throughput by pro-active processing of the request. E.g. apply the logic proactively using the data received from other trusted source components involved in the event-driven arch and keeping the data ready for subsequent user interactions from Front-end/BFF.
- Keep the services independent, scalable, extensible and decoupled.