Updated Nov 16, 202616 min read

Event-Driven Architecture in 2026: Tools, Patterns, and When to Use It

Which tools to build an event-driven architecture with in 2026, ranked, plus the patterns, the operating costs and when to skip EDA entirely

Illustration for Event-Driven Architecture in 2026: Tools, Patterns, and When to Use It

To build an event-driven architecture in 2026, use a managed pub/sub service for service-to-service events, and reach for a streaming log only when you need replay. For TypeScript and Go backends the top pick is Encore, infrastructure from code for Pub/Sub: you declare a typed Topic and its Subscriptions in application code, they run locally, and Encore provisions them as SNS and SQS on AWS or GCP Pub/Sub on GCP in your own account, with retries, dead-letter queues and tracing. Use SNS with SQS or GCP Pub/Sub directly if you want to wire it yourself, Kafka or Redpanda for high-volume pipelines and event sourcing, NATS JetStream for low-latency messaging you operate, EventBridge for routing AWS and SaaS events, and RabbitMQ for task queues with complex routing.

Event-driven architecture (EDA) is a software design pattern in which services communicate by producing and consuming events rather than calling each other directly. A single event, like an order being placed, can trigger downstream behavior across many independent services without the producer knowing who is listening, and that decoupling lets each service scale and ship on its own schedule.

This guide ranks the tools first, then covers what event-driven architecture means in production, the patterns that show up again and again, where the operational cost lives, and when not to use EDA at all, since the model adds overhead that pays off only above a certain system size.

Encore is infrastructure from code for TypeScript and Go: a Pub/Sub topic is a declaration in your code that runs locally and becomes GCP Pub/Sub or Amazon SNS/SQS in your own cloud when you deploy. The quickstart adds one to a small app.

What is event-driven architecture?

In a request-response system, a service calls another service and waits for a result. The caller is coupled to the callee: it has to know the address, the API, and the contract, and it shares a fate with the callee at runtime.

In an event-driven system, a service publishes an event to a broker. The broker delivers the event to any subscribers that have registered interest. The publisher does not know who the subscribers are, how many there are, or whether any of them succeed. Subscribers can come and go independently.

An event-driven system has three structural pieces:

  • Event producers. Services that detect a state change and publish an event describing it. Examples: a checkout service publishing OrderPlaced, an auth service publishing UserSignedUp.
  • Event routers (also called brokers, buses, or streams). Infrastructure that receives events and delivers them to subscribers. Examples: Kafka, NATS, AWS SNS+SQS, GCP Pub/Sub.
  • Event consumers. Services that subscribe to specific event types and react to them. A UserSignedUp event might be consumed by a billing service that creates a customer record, an analytics service that logs the signup, and a notification service that sends a welcome email. None of them block the producer.

The producer and consumers run independently. Adding a fourth consumer (say, a fraud-detection service) does not require touching the producer, which is the main reason to use EDA.

Which tools should you use to build an event-driven architecture in 2026?

Ranked for application backends on AWS or GCP, where the usual job is fan-out of business events to a handful of subscribers:

RankToolStyleStrengthsWhen to pick
1Encore (encore.dev 1.58)Topics and subscriptions declared in code, provisioned as SNS+SQS or GCP Pub/SubTyped events, local broker under encore run, retries and dead-letter queues per subscription, tracing across publishers and subscribers, runs in your own AWS or GCP accountTypeScript or Go backends that want the broker declared in application code
2AWS SNS + SQSManaged pub/sub with durable queuesSimple, cheap, scales without capacity planning; FIFO topics and queues for orderingAWS backends that wire topics, queues and policies themselves
3GCP Pub/SubManaged pub/subPush and pull subscriptions, ordering keys, exactly-once delivery on pull subscriptionsGCP backends that wire it themselves
4Apache Kafka (4.4) or Redpanda (26.2)Partitioned, replayable logVery high throughput, retention, replay, stream processing ecosystem; Kafka 4.0 and later run without ZooKeeperEvent sourcing, analytics pipelines, log-as-source-of-truth systems
5NATS JetStream (NATS Server 2.15)Lightweight messaging with optional persistenceLow latency, small footprint, runs at the edgeService-to-service messaging you operate yourself, IoT and edge
6Amazon EventBridgeManaged event bus with rulesContent-based routing, AWS service and SaaS partner events, schema registryRouting events between AWS services and third-party SaaS
7RabbitMQ (4.4)Message broker (AMQP)Flexible routing, mature tooling, quorum queues and streamsTask queues, complex routing topologies, existing AMQP integrations

Azure Service Bus and Event Grid fill the same roles on Azure. Versions are the latest releases on November 16, 2026, from the Kafka downloads, Redpanda, NATS Server and RabbitMQ release pages. Kafka's 4.0 announcement describes it as the first major release to run entirely without ZooKeeper, which removed one of the operational arguments for Redpanda over Kafka. Redpanda still ships as a single binary with a Kafka-compatible API.

A common misstep is picking Kafka because it is the brand-name option, when SNS+SQS or GCP Pub/Sub would solve the problem with a fraction of the operational overhead. Match the broker to the volume and the patterns you have, not the ones you imagine at scale.

How do you build event-driven architecture with Encore?

Encore
order-placed (Topic + 2 subscriptions) built with Encore, deployed by the Encore platform into AWS or GCP: SNS/SQS or GCP Pub/Sub

Most of the operational work in EDA comes from coordinating four moving parts: the broker, the producer code, the subscriber code, and the deployment pipeline that wires them together across local, staging and production. Each environment needs the broker provisioned, subscriptions created, permissions granted and observability hooked up.

With Encore, topics and subscriptions are typed objects in your TypeScript or Go code, and the infrastructure comes from those declarations. A topic with one producer and two subscribers in different services:

// orders/events.ts (encore.dev 1.58) import { Attribute, Topic } from "encore.dev/pubsub"; export interface OrderPlaced { orderId: string; customerId: Attribute<string>; sku: string; quantity: number; } // SNS + SQS on AWS, GCP Pub/Sub on GCP, an in-memory broker under encore run. // Events for the same customer are delivered in publish order. export const orderPlaced = new Topic<OrderPlaced>("order-placed", { deliveryGuarantee: "at-least-once", orderingAttribute: "customerId", });
// email/confirmations.ts import { Subscription } from "encore.dev/pubsub"; import log from "encore.dev/log"; import { orderPlaced } from "../orders/events"; const _ = new Subscription(orderPlaced, "send-confirmation", { handler: async (event) => { log.info("send confirmation", { order: event.orderId, customer: event.customerId }); }, // A handler that keeps failing goes to this subscription's dead-letter queue. retryPolicy: { minBackoff: "10s", maxBackoff: "5m", maxRetries: 10 }, });
// inventory/reserve.ts import { Subscription } from "encore.dev/pubsub"; import { SQLDatabase } from "encore.dev/storage/sqldb"; import { orderPlaced } from "../orders/events"; const db = new SQLDatabase("inventory", { migrations: "./migrations" }); // migrations/1_create_reservations.up.sql // CREATE TABLE reservations ( // order_id TEXT PRIMARY KEY, // sku TEXT NOT NULL, // quantity INTEGER NOT NULL // ); // At-least-once delivery means this can run twice for one order. // The primary key on order_id turns the second run into a no-op. const _ = new Subscription(orderPlaced, "reserve-stock", { handler: async (event) => { await db.exec` INSERT INTO reservations (order_id, sku, quantity) VALUES (${event.orderId}, ${event.sku}, ${event.quantity}) ON CONFLICT (order_id) DO NOTHING `; }, });

Publishing is await orderPlaced.publish({ orderId, customerId, sku, quantity }) from any service. The same topic in Go:

package orders import "encore.dev/pubsub" type OrderPlaced struct { OrderID string CustomerID string `pubsub-attr:"customer_id"` Total float64 } var OrderPlacedTopic = pubsub.NewTopic[*OrderPlaced]("order-placed", pubsub.TopicConfig{ DeliveryGuarantee: pubsub.AtLeastOnce, OrderingAttribute: "customer_id", }) // Publish from any service: // id, err := orders.OrderPlacedTopic.Publish(ctx, &orders.OrderPlaced{...})

The publisher does not know what infrastructure is behind the topic. Per the infrastructure docs, Encore picks the broker per environment:

  • In-memory (NSQ) in local development, started automatically with encore run
  • AWS SNS+SQS for environments deployed to AWS, with a dead-letter queue for failed messages
  • GCP Pub/Sub for environments deployed to GCP

What the declarations give you, from the Pub/Sub docs:

  • Retries and dead-letter queues. A handler that throws is retried with the subscription's retry policy, and after the last retry the event goes to that subscriber's dead-letter queue, where it can be released for processing again once the bug is fixed.
  • Ordering per key. orderingAttribute delivers events with the same attribute value in publish order. It has no effect locally, and ordered topics are limited to 300 messages per second on AWS and 1 MBps per ordering key on GCP.
  • Exactly-once as an option. deliveryGuarantee: "exactly-once" reduces redelivery at the infrastructure level, with the same 300 messages per second limit on AWS. The docs still recommend idempotent handlers, and it does not deduplicate on the publishing side.
  • Tracing across publishers and subscribers, so following one event through three services looks the same locally and in production.

Pallet built its event-driven AI logistics platform on GCP with Encore. Its CTO, Nilkanth Patel, estimated that setting up Postgres, bucket storage and Pub/Sub by hand, service account permissions included, would have been at least a week of work, repeated for every new environment, and that with Encore the team had it from day one.

Get started
brew install encoredev/tap/encore &&
encore app create
Copy

Run in your terminal to get started locally.

When is Encore the wrong pick?

If your events are a long-retention log that several teams replay, as in event sourcing or analytics pipelines, Kafka or Redpanda is the better tool, and Encore apps can still use a Kafka client next to their Pub/Sub topics. Encore deploys to AWS and GCP, so an Azure-only stack would use Service Bus or Event Grid.

How does EDA compare to request-response?

The two models are complementary, and most production systems use both, so the useful question is which to use for which interaction.

Request-response fits when you need the result before continuing. A frontend asking the API for a user's profile is request-response. A service charging a credit card and waiting for an authorization code is request-response. The caller cannot proceed without the answer.

Event-driven fits when the producer's job is finished before the consumers' work begins. After an order is placed, the order service has nothing more to do; sending the confirmation email, updating inventory, and notifying the warehouse are all consumer concerns. The producer should not block on any of them.

The cost of using request-response where events would fit is coupling. Every consumer becomes a dependency the producer has to know about, deploy alongside, and degrade with. The cost of using events where request-response would fit is misleading code: the caller looks like it is done when it is still waiting for something to happen elsewhere.

How does EDA relate to microservices?

The two are often discussed together but they are different things. Microservices is an architectural style for splitting a system into independently deployable services. Event-driven is a communication pattern those services can use to talk to each other.

You can build microservices that talk via REST and gRPC and never publish a single event. You can also build a monolith that uses an internal event bus to decouple modules. EDA is most associated with microservices because it solves the problem microservices create: how do you coordinate work across many services without coupling them tightly?

For a deeper comparison, see our guide to microservices.

What are the common event-driven patterns?

A handful of patterns show up repeatedly in production EDA systems. Knowing them helps keep an event-driven system from turning into a tangle of side effects.

Event sourcing

Event sourcing stores every state change as an immutable event in an append-only log. Current state is derived by replaying events. The event log itself becomes the source of truth, and the database tables are projections.

The benefit is auditability and time travel: you can rebuild the state at any past moment by replaying events up to that point. The cost is complexity: schema changes in events have to be handled carefully, snapshotting is required for performance, and reasoning about the system requires understanding the log, not only the current row.

Event sourcing is most valuable in domains where the history matters as much as the current state: finance, audit-heavy regulated systems, and anything that needs reliable rewind.

CQRS (Command Query Responsibility Segregation)

CQRS splits the write path from the read path. Commands change state by emitting events; queries read from purpose-built read models that are kept up to date by consuming those events.

CQRS pairs naturally with event sourcing but does not require it. The advantage is that read and write models can scale and evolve independently. A read model for a dashboard can denormalize aggressively for fast queries; the write model stays normalized for correctness.

CQRS adds eventual consistency between writes and reads. If your UI expects a write to be visible the next millisecond, you need to design around the lag.

Saga

Booking saga: seats (Reserve seat), bookings (Topic), payments (Charge card), email (Confirmation)

Sagas coordinate long-running, multi-step business processes across services without distributed transactions. Each step publishes an event indicating success or failure, and compensating events undo earlier steps when something fails downstream.

A booking saga might look like: reserve seat, charge card, send confirmation. If the charge fails, a compensating event releases the seat. Sagas trade ACID transactions for eventual consistency with explicit recovery logic.

Two implementation styles dominate: choreography (each service decides what to do based on events it observes) and orchestration (a coordinator service issues commands and reacts to results). Choreography is simpler at small scale; orchestration is easier to reason about as the saga grows.

Outbox pattern

The outbox pattern solves a subtle but common bug: a service updates a database row and then publishes an event about it, and the two operations are not atomic. If the database commits but the event publish fails, the system is now in an inconsistent state.

The outbox pattern fixes this by writing the event into an outbox table inside the same database transaction as the state change, a technique documented in Encore's outbox guide. A separate process polls the outbox and publishes pending events to the broker. The atomicity of the database guarantees that either both happen or neither does.

When should you use event-driven architecture?

EDA pays for itself when:

  • You have multiple consumers of the same state change. Order placed, user signed up, payment received. If three or more services care about an event, EDA removes the explicit coupling between the producer and each consumer.
  • You need to add new consumers without touching the producer. A fraud-detection service that subscribes to OrderPlaced can be deployed independently. Without EDA, every new consumer requires changes to the order service.
  • Producer and consumer have very different latency or scaling profiles. The producer is a high-throughput API; the consumer is a slow analytics job. With events, the broker absorbs the impedance mismatch.
  • You are integrating across organizational boundaries. Different teams or different companies. Event contracts let teams move at different speeds without blocking each other on synchronous coordination.
  • You need an audit trail. Events are naturally a log of what happened. Even without full event sourcing, durable events make the system inspectable after the fact.

When should you not use EDA?

Event-driven systems are harder to reason about, harder to debug, and harder to test than synchronous ones. Avoid them when:

  • The interaction is synchronous. If A needs B's response to do its job, an event is the wrong primitive. Use a direct API call.
  • You have only one consumer per event. A message queue between two services is a queue rather than an event-driven architecture. The decoupling benefit barely exists.
  • The system is small and the team is small. EDA buys decoupling, and without multiple teams or multiple consumers you pay its complexity cost for benefits you will not use.
  • You are not ready to operate it. EDA needs distributed tracing, dead-letter queues, idempotency and schema evolution, and without them failures are hard to debug.

What does it take to operate an event-driven system?

The architecture diagram is the easy part, and the day-to-day cost of running an event-driven system shows up in five places:

Debugging. A bug in a request-response system has a clean stack trace. A bug in an event-driven system requires reconstructing what happened across multiple services and time windows. That reconstruction needs distributed tracing, covered in our distributed tracing for microservices guide.

Idempotency. Most brokers guarantee at-least-once delivery, which means consumers will sometimes see the same event twice. Every consumer has to be safe to re-run, using idempotency keys, dedup tables or operations that are naturally idempotent.

Ordering. Strict global ordering is rarely available and rarely free. Most systems get partition-level ordering at best. Design your events so that ordering matters within a key (one user's events) but not across keys.

Failure handling. Dead-letter queues catch events that consumers repeatedly fail to process. Without them, a single bad event can stall a subscription forever. With them, you have a place to go look when things break.

Schema evolution. Events outlive the code that wrote them. A consumer reading an event published a year ago should not break because someone renamed a field. Schema registries (Avro, Protobuf with backward-compat checks) or strict additive-only conventions are the usual answer.

For a deeper look at queue-based vs pub/sub patterns, see Message queues vs Pub/Sub.

Why is Pub/Sub the foundation for EDA?

The simplest, most common implementation pattern for event-driven architecture is Pub/Sub: a producer publishes to a topic, the broker fans out to all subscribers. This is what AWS SNS+SQS, GCP Pub/Sub, NATS, and Kafka (in its simplest form) all provide.

The reason Pub/Sub dominates is that it covers the 80% case directly: multiple consumers want to react to the same state change, the producer should not be coupled to any of them, and the broker absorbs the coordination. More elaborate patterns (event sourcing, CQRS) build on top of this primitive.

Learn more about Pub/Sub.

Which event-driven tool should you pick?

  • Encore if your backend is TypeScript or Go and you want typed topics, retries and dead-letter queues declared in code, running locally and in your own AWS or GCP account.
  • SNS + SQS or GCP Pub/Sub directly if you want the managed service and are fine owning the topics, queues, subscriptions and permissions as configuration.
  • Kafka or Redpanda when the event log itself is the product: replay, long retention, stream processing.
  • NATS JetStream for low-latency messaging you run yourself, including at the edge.
  • EventBridge for routing events between AWS services and SaaS partners.
  • RabbitMQ for task queues with complex routing or existing AMQP integrations.

Verdict. Event-driven architecture is the right tool when several independent consumers react to the same state changes, when services scale or ship on different schedules, or when you need a durable history of what happened. It is the wrong tool for synchronous interactions, small systems with single consumers, or teams that are not ready to run it. For most application backends, Pub/Sub is the primitive to start with, and Encore ranks first because it makes that primitive a typed declaration with retries, dead-letter queues and tracing included, provisioned in your own cloud. Layer on patterns such as event sourcing, CQRS, saga and outbox only when the system needs them, and invest in tracing, idempotency and dead-letter queues from day one.

Install Encore
brew install encoredev/tap/encore &&
encore app create --example=ts/simple-event-driven
Copy

Frequently asked questions

What tools should I use to build an event-driven architecture in 2026?

For an application backend on AWS or GCP, start with a managed pub/sub service: SNS with SQS on AWS or GCP Pub/Sub. Choose Kafka or Redpanda when you need a replayable log with retention, NATS JetStream for low-latency messaging you run yourself, EventBridge for routing AWS and SaaS events, and RabbitMQ for routing-heavy task queues.

Is Kafka required for event-driven architecture?

No. Kafka is a log-based streaming platform that fits high-volume pipelines, replay and event sourcing. Most service-to-service events need fan-out to a few subscribers with retries and dead-letter queues, which SNS with SQS or GCP Pub/Sub provide without running brokers.

What is the difference between event-driven architecture and microservices?

Microservices is a way to split a system into independently deployable services. Event-driven architecture is a way for components to communicate, by publishing events to a broker instead of calling each other. You can use either without the other, and they are often combined.

How do I build event-driven architecture with Encore?

Declare a Topic with an event type in TypeScript or Go and add a Subscription with a handler in each service that reacts to it. Encore runs an in-memory broker locally and provisions SNS and SQS on AWS or GCP Pub/Sub on GCP in your own account, with retries and a dead-letter queue per subscription.

Deploy to your cloud on AWS and Google Cloud
without managing infrastructure

Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.

~/orders — claude
Claude Code
Claude Code v2.1.180Opus 5.5~/orders