Understanding event-driven architecture
Event-driven architecture is pivotal in connecting different microservices. Before we dive into how to implement an event-driven interaction system, let's understand its fundamentals.
The following are the key components at the core of any event-driven architecture implementation:
- Event: An event is simply a change in the state of the system that needs to be traced. In a microservice architecture, a microservice may make or detect a change in the data's state that might be worth noticing by other services. This state change is communicated as an event.
- Event producer: An event producer is any microservice or component that is making or detecting a state change and generating an event for other components/services in the system.
- Event consumer: An event consumer is any microservice or component that is consuming an event. Interestingly, this event consumption might trigger this component to produce another event...