Newer Version Available
Event-Driven Software Architecture
- Event
- A change in state that is meaningful in a business process. For example, placement of a purchase order is a meaningful event because the order fulfillment center expects to receive a notification before processing an order.
- Event message
- A message that contains data about the event. Also known as an event notification. For example, an event message can be a notification about an order placement containing information about the order.
- Event producer
- The publisher of an event message.
- Event channel
- A stream of events on which an event producer sends event messages and event consumers read those messages. For platform events, the channel is for a single platform event and groups all event messages for that platform event.
- Event consumer
- A subscriber to a channel that receives messages from the channel. For example, an order fulfillment app that is notified of new orders.
- Event bus
- A communication and storage service that enables event streaming using the publish-subscribe model. The event bus enables the retrieval of stored event messages at any time during the retention window.
Systems in request-response communication models make a request to a web service or database to obtain information about a certain state. The sender of the request establishes a connection to the service and depends on the availability of the service.
In comparison, systems in an event-based model obtain information and can react to it in near real time when the event occurs. Event producers don’t know the consumers that receive the events. Any number of consumers can receive and react to the same events. The only dependency between producers and consumers is the semantic of the message content.
The Event Bus
Platform event messages are published to the event bus, where they are stored temporarily. You can retrieve stored event messages from the event bus using a CometD (Streaming API) client. Each event message contains the ReplayId field, which identifies the event in the stream and enables replaying the stream after a specific event. For more information, see Message Durability in the Streaming API Developer Guide.
