Newer Version Available

This content describes an older version of this product. View Latest

Event-Driven Software Architecture

An event-driven (or message-driven) software architecture consists of event producers, event consumers, and channels. The architecture is suitable for large distributed systems because it decouples event producers from event consumers, thereby simplifying the communication model in connected systems.
Event
A change in state that is meaningful in a business process. For example, a purchase order is a meaningful event because the order fulfillment center requires notification to process the order. Or a change in a refrigerator’s temperature can indicate that it needs service.
Event message
A message that contains data about the event. Also known as an event notification.
Event producer
The publisher of an event message over a channel.
Channel
A conduit in which an event producer transmits a message. Event consumers subscribe to the channel to receive messages.
Event consumer
A subscriber to a channel that receives messages from the channel.

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.

Event-based software architecture diagram