In an Event-Driven Architecture, a system reacts to an event and sends an acknowledgment. In this type of architecture, a system generally sends a response when an event occurs.
An Event-Driven Architecture contains the following parts:
|Publisher||The application that sends the message|
|Message broker||An intermediate infrastructure responsible for facilitating the sending of a message from the Publisher to the Subscriber|
|Subscriber||The application that receives the message sent by the Publisher|
|Message||A piece of information that is sent to all the interested Subscribers from a Publisher via the Message broker|
|Channels||The Message broker sends the message to the Subscribers via multiple channels|
AsyncAPIs work on the principle of Event-Driven Architecture (EDA). In AsyncAPIs, multiple Subscribers can subscribe to a Publisher. When an event occurs, the Publisher can notify all the Subscribers via the Message broker.
The following component shows an example of how an AsyncAPI works.