Event-driven architecture

Hand-drawn five small hatched terracotta discs, each ringed by concentric terracotta circles that overlap their neighbours, over flowing cream, sand, umber and moss contour lines.

Event-driven architecture is a way of building software in which components communicate by producing events and reacting to them (Bação & Guerreiro, 2026). The term covers distinct design choices, such as what an event carries and whether stored events are the system’s primary record (Fowler, 2017). Comparisons of modularity with request-response designs cover single applications and give mixed results (Lazzari & Farias, 2023; Bogner et al., 2019). A message broker’s delivery guarantees stop at the broker, so duplicate side effects in the application remain the application’s problem (Apache Kafka, n.d.; Richardson, n.d.). Event formats must also change while old and new versions coexist, and compatibility checks do not catch every loss of meaning (Google, n.d.d). Studies of workflows coordinated by services reacting to each other, or by a central coordinator, measure different outcomes and point in different directions (Haj Ali et al., 2022; Nadeem & Malik, 2022).

What “event-driven” means

Sources agree on a broad definition and use the word for very different designs. The common core is components that announce events and others that react (Bação & Guerreiro, 2026). Martin Fowler, a practitioner author, separates four patterns that share the label (Fowler, 2017).

PatternWhat it does
Event notificationThe event says something happened, often with only an identifier and a link the receiver can query for details.
Event-carried state transferThe event carries the changed data, so each receiver can update its own copy.
Event sourcingA stored sequence of events is the primary record, and the current state is derived from it.
CQRS (command query responsibility segregation)Separate data structures for writing and for reading information.

The four are independent choices. CQRS in particular can be used without any events in the design (Fowler, 2017).

Events inside one program

Events do not require a network or a broker. An early account of software architecture described “implicit invocation”: a component registers procedures with events, and the system calls those procedures when the events are announced at run time (Garlan & Shaw, 1994). Node.js, a JavaScript runtime, shows how narrow this can be: its EventEmitter calls every registered listener synchronously, in the order the listeners were registered (Node.js, n.d.b).

Where the patterns came from

Fowler’s own terms changed over time. His 2006 draft pattern, Event Collaboration, described components that work together by sending events when their internal state changes (Fowler, 2006). In 2017 he wrote that this draft conflated notification and state transfer, which he began to see as separate only during a workshop (Fowler, 2017). Later pattern catalogues for API design build on both: an endpoint that publishes events can let clients be notified or poll for new events (Singjai et al., 2021). How events are pushed to clients over the web, through webhooks and streams, is covered in Web APIs.

Publish-subscribe and queues

Two ways of distributing messages are often confused, because one product can offer both. In publish-subscribe, each published event goes to every subscriber (Microsoft, 2026f). In a queue with competing consumers, several consumers pull from one queue and each message goes to only one of them (Microsoft, 2026f; Eugster et al., 2003).

The names describe interaction patterns rather than products. A classic survey of publish-subscribe notes that systems sold as message queues usually include some form of publish-subscribe as well (Eugster et al., 2003). Even the “one consumer per message” promise has a condition: Microsoft’s guide states it holds when there are no errors (Microsoft, 2026f).

Event sourcing in industry Weak evidence: few or small studies support this

Event sourcing in practice comes with documented costs in schema change, rebuilding views and privacy. In an interview study of engineers and the event-sourced systems they built, every system also used CQRS (Overeem et al., 2021). The engineers named rebuilding projections, the read views derived from the event log, and data privacy as challenges (Overeem et al., 2021).

Snapshots and replay Weak evidence: few or small studies support this

Snapshots, saved copies of state at a point in the event log, can shorten recovery from a long history, but the measured gains come from one prototype. In that prototype, a hybrid snapshot strategy cut recovery time to 40 seconds under bursts of load (Shyngys et al., 2026). A production report describes recovering an inventory system by replaying about one million events, without comparing snapshot policies (Shah, 2026b).

Limits of the event history Weak evidence: few or small studies support this

An event log is an incomplete record for debugging failures. Lima and colleagues argue that replaying business events can miss untracked events from internal components or external systems that also contribute to failures (Lima et al., 2021).

Changing event schemas

An event’s format has to change while old and new producers, consumers and stored events coexist, and compatibility checks cover only part of that. A schema is the declared structure of an event’s data. A compatibility direction says whether readers using a new schema must handle data written with the old one (backward), the reverse (forward), or both (full).

In event-sourced stores Weak evidence: few or small studies support this

Teams that keep events as their primary record need ways to change the events’ format. The interview study of event-sourced systems found five techniques in use: versioned events, a weak schema, upcasting, in-place transformation, and copy-and-transform (Overeem et al., 2021). Upcasting means a component converts each old event to the current format before the application receives it (Overeem et al., 2017). Rewriting events in place breaks the rule that the event store never changes, so cached projections must be rebuilt (Overeem et al., 2021).

Compatibility directions and rollout order

The compatibility direction decides which side must upgrade first. Under backward compatibility, Confluent’s schema registry documentation advises upgrading all consumers before producing events with the new schema. Under full compatibility, producers and consumers can upgrade independently (Confluent, n.d.a).

Rollback and replay bring back older versions, so a check against the latest schema alone can miss them. In transitive mode the registry checks a new schema against every registered version; otherwise it checks only the latest (Confluent, n.d.a). For JSON Schema, the result also depends on the chosen policy and on whether the schema allows additional properties (Confluent, n.d.a).

When compatible data still loses meaning

Each encoding defines compatibility its own way. In Avro, when a reader expects a field the writer omitted, the reader’s default value is used, and without a default the decoder signals an error (Apache Avro, n.d.). In Protocol Buffers, field numbers of existing fields must never change. A change that is safe on the wire can still break code compiled against the generated classes, and data that still parses may be read lossily (Google, n.d.e).

Data that parses can still lose information between versions. Protocol Buffers counts widening a field from int32 to int64 as compatible, yet an old reader discards the high bits of any value above the int32 maximum (Google, n.d.d). A client that relies on knowing whether a field was set can lose that information when the message passes through a client that does not track it (Google, n.d.a).

What a schema registry does not check Weak evidence: few or small studies support this

The evidence is vendor documentation and one team’s failure report. A registry protects consumers only when producers use it. Confluent’s broker-side validation checks that a message’s schema ID is registered under a valid subject, without inspecting the data itself (Confluent, n.d.b). Engineers at 10x Banking describe a Kafka consumer that failed on every attempt to deserialize one record, so it never moved past it. They note that a registry gives consumers no protection unless the producer actually uses it (Murkin, 2021).

Incompatible changes in CloudEvents

CloudEvents, a specification for describing events in a common envelope, treats an incompatible payload change as a new kind of event. Its primer advises changing the event’s type and dataschema attributes, and producing both the old and the new event for some time, potentially forever (CloudEvents, n.d.a). A separate attribute, specversion, names the version of the CloudEvents specification the envelope follows (CloudEvents, n.d.b).

Delivery guarantees and application side effects

A broker’s guarantee covers what happens inside the broker, not the effects an application produces elsewhere. Delivery guarantees are usually stated as at-most-once (a message may be lost), at-least-once (a message may arrive twice) or exactly-once.

What a broker can promise

Apache Kafka, an event broker, illustrates both the reach and the limit of a broker’s guarantees. Kafka orders records totally within each partition of a topic, not across partitions (Apache Kafka, n.d.). It can record that a consumer has processed input and write that consumer’s output to other Kafka topics in one transaction (Apache Kafka, n.d.). For destinations outside Kafka, its documentation says exactly-once delivery generally requires the destination system to cooperate (Apache Kafka, n.d.).

The reason is an old argument in system design, the end-to-end argument. Even when the network suppresses its own duplicates, the application can create duplicate requests through its own failure and retry procedures (Saltzer et al., 1984).

Acknowledgements in AMQP and RabbitMQ

AMQP 1.0, a standard messaging protocol, keeps a message’s delivery details in a header section, apart from its properties and body (OASIS Advanced Message Queuing Protocol (AMQP) Technical Committee, 2012). A broker may discard a message whose ID matches an earlier one sent to the same node, but the standard does not require it (OASIS Advanced Message Queuing Protocol (AMQP) Technical Committee, 2012).

An acknowledgement means something different on each side of the broker. In RabbitMQ, an “accepted” outcome sent to a publisher means every queue the message was routed to has accepted it. An “accepted” outcome from a consumer means it processed the message, so the broker may delete it. A “rejected” outcome dead-letters the message, or drops it if no dead-letter target is configured (RabbitMQ, n.d.a). When a consumer closes with messages it has not yet settled, they are requeued, which can lead to duplicate processing (RabbitMQ, n.d.b).

Patterns for the application side

The transactional outbox handles the gap between a database and a broker. The service writes its business change and the outgoing message in one database transaction, and a separate process later sends the message to the broker (Richardson, n.d.). The relay may publish a message more than once. Consumers must therefore be idempotent, meaning that processing a message twice has the same effect as once, for example by tracking the IDs of messages already handled (Richardson, n.d.).

Testing the guarantees themselves Weak evidence: few or small studies support this

Documented guarantees can also fail inside their own scope, which only independent fault testing reveals. In tests of the Redpanda broker, version 21.11.2 and some development builds, Jepsen occasionally saw writes from successfully committed transactions vanish, even in healthy clusters (Kingsbury, 2022). The result concerns those builds; it says nothing about other brokers or later versions. Distributed protocols can also be checked mathematically, which formal verification covers.

Sagas, choreography and orchestration Weak evidence: few or small studies support this

Two small studies of coordinating multi-step workflows measured different things and point in different directions, so neither style has evidence of being better in general. The underlying idea is old. A saga, as defined for databases in 1987, breaks a long transaction into a series of smaller transactions that can interleave with others. Either all of them complete, or compensating transactions run to undo the effect of a partial execution (Garcia-Molina & Salem, 1987).

Across services, a saga can be coordinated in two ways. In choreography, each service reacts to events from the others and no component sees the whole flow. In orchestration, one coordinator tells each service what to do next.

A modelling study of e-commerce workflows rated orchestration as more complex, given the number of services in the authors’ models (Haj Ali et al., 2022). Its measures are structural, such as the number of arcs in the workflow diagram relative to its other elements (Haj Ali et al., 2022). A separate study ported the TrainTicket benchmark application to a workflow engine and found the orchestrated version easier to debug (Nadeem & Malik, 2022). Its debugging times were compared with times reported in the original benchmark study, not measured side by side (Nadeem & Malik, 2022).

In a workshop with 12 participants, a tool-managed method for composing services from fragments of business-process diagrams synchronized changes to functional requirements and new coordination events (Ortiz et al., 2023).

Effects on modularity and performance Weak evidence: few or small studies support this

Whether event-driven design makes code more modular rests on single-application comparisons with mixed results. In one comparison of two versions of the same application, the event-driven version separated concerns better but scored worse on coupling, cohesion, complexity and size (Lazzari & Farias, 2023). Its request-response version was built in the model-view-controller style, so the comparison also changes the framework, not only the messaging (Lazzari & Farias, 2023).

A controlled experiment on a web shop found the reverse pattern for coupling. The version built with several service patterns, event-driven messaging among them, scored slightly better on coupling and worse on size and granularity (Bogner et al., 2019). Because messaging changed together with other patterns, the result does not isolate its effect.

Other measures come from single cases. A preprint comparing an event-driven and a monolithic implementation of one application found higher average CPU use in the monolith (Cabana & Farias, 2022). After moving a big-data system from a monolith to event-driven microservices, the team perceived easier maintenance and fault isolation. They saw the many technologies and the complex data flow as drawbacks (Laigner et al., 2020). The general trade-offs of splitting a system into services are covered in Microservices and monoliths.

Problems developers report Weak evidence: few or small studies support this

Developers’ questions show where event-driven systems hurt in practice: payloads, schemas, debugging and ordering. A study of more than 8,000 Stack Overflow questions found recurring problems in four areas. They were large event payloads, modelling event schemas, auditing and debugging event flows, and ordering and dependencies between events (Laigner et al., 2026). A later literature review notes that these findings come from developer discussion rather than synthesis of academic research (Bação & Guerreiro, 2026).

Further reading

  • Fowler, “What do you mean by Event-Driven?” (Fowler, 2017): the short practitioner essay that separates event notification, event-carried state transfer, event sourcing and CQRS.
  • Eugster and colleagues, “The many faces of publish/subscribe” (Eugster et al., 2003): a survey of publish-subscribe systems that sets them apart from message queues.
  • Overeem and colleagues, “An empirical characterization of event sourced systems and their schema evolution” (Overeem et al., 2021): interviews with engineers on what event sourcing costs in industry.
  • Apache Kafka, “Design” (Apache Kafka, n.d.): the broker’s own account of ordering, transactions and the limits of exactly-once delivery.
  • Kingsbury, “Redpanda 21.10.1” (Kingsbury, 2022): an independent fault-testing report showing how a broker’s documented guarantees can fail.
  • Laigner and colleagues, “An empirical study on challenges of event management in microservice architectures” (Laigner et al., 2026): the problems developers raise when building event-driven services.

Known gaps

What this article cannot tell you yet.

  1. Independent benchmarks of message brokers, and the MQTT and NATS protocols, were not researched.
  2. Whether enforcing schema compatibility in a registry reduces failures in production was not measured; the failure reports under incompatible serialization are single first-hand accounts.
  3. How later implementations of sagas in services changed the guarantees of the original 1987 database saga was not researched.
  4. No production study compares snapshot policies for event-sourced systems; the measured gains from snapshots come from a prototype.
  5. The interview findings on event sourcing in industry were not independently replicated, and no independent test of the event-conversion techniques was found.
  6. No comparison of event-driven and request-response designs changes messaging alone while holding the application, technology and deployment fixed.
  7. Whether diagram-based complexity scores for choreography and orchestration predict the human effort of debugging or changing a workflow was not tested in any study found.
  8. Independent replications of the runtime resource results for event-driven implementations were not researched.
  9. Whether adding tracing improves debugging of event-sourced systems was not researched.
  10. The Stack Overflow study of event-management problems and the choreography complexity study are known only from their abstracts.

References

Solid source
Rated highly trustworthy by the research, and every passage taken from it was found in it.
Weak source
Rated low, or a passage taken from it was not found in it.
Medium trust
Rated medium by the research.
Not checked
Rated high, but its passages could not all be checked against it.
Show all 38 references