ArchitectureIntermediate

Event-Driven vs Request-Driven: When to Use Events

DeveloperHat Team
19 min read

TL;DR

Event-driven or request-driven? A decision-first guide to queues, brokers and the outbox — what each costs, who each is for, and when a plain HTTP call wins.

Most teams do not choose event-driven architecture. They accumulate it — one team adds a queue to stop a slow endpoint blocking checkout, another publishes an event so the search index stays fresh, a third wires a topic into analytics, and two years later the system has a broker at its centre, nobody can say which services depend on which events, and a message that was supposed to be delivered once has charged a customer twice. The reverse drift happens too: a team that genuinely needs events keeps bolting synchronous calls onto a workflow that should have been a log, and every new integration becomes another point-to-point call that has to be up at the same time as everything else.

Both drifts share one root cause: the decision was made by vocabulary, not by need. "Event-driven" sounds modern, "request-driven" sounds old-fashioned, so the choice gets made before anyone asks what the caller actually needs. This article is the decision record most teams skip. It covers request-driven calls, queues, and full event streaming — who each option is for, what each one costs, and how to reverse the choice when it stops fitting.

The short version: if the caller needs an answer now, make a synchronous call and be done with it. If the work can happen later and exactly once matters, put a queue in the middle. If many independent readers need the same fact, or you need to replay history, build on a durable log — and pay for the outbox, the idempotency, and the observability that make the log safe. If you are unsure, start request-driven and add the queue only when a real need appears — a queue extracts cleanly from a synchronous call; an event log does not un-build.

Same checkout, two shapes — one waits for an answer, one publishes and moves on REQUEST-DRIVEN · SYNC Caller blocks until it hears back Service validates + writes + replies Caller resumes only after the reply EVENT-DRIVEN · ASYNC Producer writes + publishes, moves on Broker log durable, ordered, replayable Consumers each reads at its own pace Request-driven couples the caller to the answer; event-driven couples producers to a log, and consumers to their own pace.

Context: why this decision keeps getting made badly

The confusion starts with the word "event". In Martin Fowler's framing, an event is a significant change in state — an order was placed, a payment failed — and event-driven architecture is a style where components react to those changes rather than asking each other for the current state. That definition is precise, and most systems calling themselves event-driven do not meet it: they have a queue that one producer writes to and one consumer reads from, which is asynchronous messaging, not an event-driven architecture. The distinction matters because the costs are different. A queue costs you a broker and some retry logic. A real event log costs you a schema discipline, a replay story, an idempotency story, and a team that can debug a system where cause and effect are separated by minutes.

The second confusion is about decoupling. Events do decouple producers from consumers — a producer does not know who reads its events, and a new consumer can attach without the producer changing. But they couple the system to something else instead: the event schema, the ordering guarantees of the log, and the delivery semantics of the broker. A producer that renames a field breaks every consumer that reads it, and the breakage arrives asynchronously, in production, in a consumer the producer's team has never met. The coupling did not disappear; it moved, and it moved to a place where it is harder to see. That is a fair trade when you have many readers — it is a bad trade when you have one.

The third confusion is about the default. Request-driven is the default for a reason: it is the easiest shape to reason about, to test, and to debug. A caller makes a call, gets a response or an error, and the failure is visible in the same request. Everything event-driven adds — the broker, the outbox, the retries, the dead-letter queue — exists to recover properties that synchronous calls give you for free: knowing whether the work happened, knowing it happened once, and knowing it in the order it was requested. You should be able to name the property you are buying before you pay for it.

The options

Option 1: Request-driven — synchronous HTTP or gRPC

The caller makes a call and waits. The service validates, writes, and replies, or fails, and the caller knows immediately which it was. This is the shape of most internal APIs, and our REST vs GraphQL vs gRPC guide covers how to choose between the call styles when this is the right shape.

The honest strengths are the ones that disappear the moment you leave this option: immediate feedback, so the user sees "payment failed" instead of finding out by email; a single transaction across the write and the reply, so an order and its inventory decrement either both happen or neither does; stack traces instead of distributed traces; and a failure that is visible in the request that caused it. Testing is a test of a function call, not of a system that has to be observed over time.

The cost is coupling in time. The caller and the service must both be up, and the caller waits for the slowest service in the chain. A checkout that calls inventory, then pricing, then payment, then fraud detection inherits the latency and the failure rate of all four, and the tail latency of the chain is what the user experiences. The other cost is fan-out: when three systems need to know an order was placed, the caller makes three calls, and the fourth system that needs to know later requires the caller to change. If the list of interested parties keeps growing, the caller becomes a switchboard, and every new integration is a change to a service that should not have needed one.

Use it when the caller needs the answer to proceed, when the write and the response must be atomic, and when the number of interested parties is small and stable. A payment authorization is request-driven. A login check is request-driven. Most CRUD is request-driven, and no amount of event vocabulary makes it otherwise.

Option 2: A queue in the middle — async point-to-point work

The caller writes the work to a queue and moves on; a worker picks it up, does it, and acknowledges it. Amazon SQS is the canonical managed version of this shape, and Amazon EventBridge covers the adjacent case of routing events between AWS services without running a broker. The difference between a queue and a log is the point of this article, so it is worth stating plainly: a queue delivers a message to one consumer and then deletes it; a log keeps the event and lets many consumers read it, at their own pace, more than once.

The queue buys you two things and only two things: time decoupling and load levelling. Time decoupling means the producer does not wait and does not care whether the consumer is up — the work sits in the queue until someone is ready. Load levelling means a burst of a thousand orders does not become a thousand simultaneous calls to a service that can handle a hundred; the queue absorbs the burst and the workers drain it at their own rate. Both are real, and both are the reason most "event-driven" migrations are actually queue migrations that would have been fine as queues.

The cost is the loss of the answer. The caller does not know when the work finishes, or whether it finished at all, without a second mechanism — a status endpoint, a webhook back, a notification. And delivery is at-least-once in practice: a worker that crashes after doing the work but before acknowledging it will see the message again, so the work must be safe to repeat. That is not a corner case; it is the normal failure mode of every queue, and the fix — an idempotency key checked before the work runs — is a line of code you write once and a discipline you maintain forever. A queue without idempotency is a duplicate-charge machine with a retry loop attached.

Use a queue when the work can happen later, when exactly-once processing can be achieved with an idempotency key, and when there is one consumer (or a pool of identical workers) per message. Sending a welcome email, generating a PDF, resizing an image, syncing a record to a search index: all queue-shaped work. If two different systems need the same message for different reasons, you do not have a queue problem — you have an event problem, and that is the next option.

Option 3: Full event streaming — a durable log with many readers

The producer appends events to a durable, ordered log; any number of consumers read the log at their own offsets, and the log can be replayed. Apache Kafka is the reference implementation of this shape, and the current version is worth stating because it changed the operational story: Kafka 4.0, released March 18, 2025, runs entirely without ZooKeeper — KRaft, Kafka's own Raft-based metadata system, is now the only mode. One fewer distributed system to run is a real reduction in the cost of this option, and it is recent enough that older guides still describe the ZooKeeper setup.

The log buys you three things a queue cannot: many independent readers of the same fact, replay, and a history that outlives any single consumer. Many readers is the real case for events — an order-placed event feeding notifications, the search index, analytics, and a fraud model, each at its own pace, each added without touching the producer. Replay is the underrated one: a new consumer can read the log from the beginning and build its state from history, and a consumer that was down for a day catches up by reading what it missed. And the log is the audit trail: when a customer asks why their order was charged twice, the log shows exactly which events were published and when, which is a property no queue has because a queue deletes the evidence.

The event pipeline, layer by layer — the log is the contract, not the API Producers — checkout · billing · inventory emit domain events Outbox — the event is written in the same transaction as the change Broker log — Kafka topic, a durable ordered log you can replay Consumers — notifications · search index · analytics, own offsets Read models + DLQ — projections, materialized views, dead-letter queue If the outbox and the write are not in one transaction, the event can vanish — that is the failure the pattern exists to prevent.

But the log charges for all of it, and the charge is mostly not the broker. The first charge is atomicity: the business write and the event publication must happen together, or the system can lose an event. The standard fix is the transactional outbox — the event row is written to an outbox table in the same database transaction as the business change, and a relay publishes it to the log. It is a small amount of code and a large amount of discipline: every write path has to use it, or the guarantee has a hole exactly where nobody looked.

// The outbox row and the business write commit — or roll back — together.
// No two-phase commit, and no "published, then crashed" gap.
@Transactional
public void placeOrder(Order order) {
    orders.save(order);
    outbox.save(new OutboxEvent(
        "order.placed", order.getId(), toJson(order)));
}
// A relay polls the outbox table and publishes each row to the log,
// marking it published only after the broker acknowledges it.

The second charge is idempotency, now on every consumer instead of one worker. At-least-once delivery is the norm for brokers, so every consumer must treat a repeated event as a no-op. The shape is always the same — a key, checked before the work — and the failure mode is always the same too: a consumer that charges a card before checking the key.

// At-least-once delivery means this handler WILL run twice sometimes.
// The idempotency key makes the second run a no-op, not a double charge.
async function onOrderPlaced(event: OrderPlaced) {
  const done = await db.idempotencyKeys.insertIfAbsent(event.id);
  if (!done) return; // already processed — safe to skip
  await billing.charge(event.orderId, event.total);
}

The third charge is ordering and schema. A log orders events within a partition, not across them, so "the refund happened after the charge" is only guaranteed if both events share a partition key — usually the aggregate id, usually the order id. And a schema change is a contract change with every consumer: the discipline that makes this survivable is additive-only evolution — add fields, never rename or remove them — and a schema registry that rejects a breaking change before it ships. Our event-driven microservices guide covers the event-sourcing and CQRS patterns that sit on top of the log once the basics are in place, and our durable execution guide covers the alternative for multi-step workflows that need to survive a failure halfway through — often a better fit than a hand-rolled saga over events.

Use the log when many independent readers need the same fact, when replay or audit history has real value, or when consumers genuinely move at different speeds. Use it when the domain has facts that outlive the request that created them — an order's history, a device's telemetry, a ledger. Do not use it because a queue felt too simple: a queue you outgrow is a migration; a log you did not need is a platform team.

The comparison

Request-drivenQueueEvent streaming
Caller getsAn answer, nowAn acknowledgement, laterAn acknowledgement, later
Readers per messageOne (the caller)One (or a pool of identical workers)Many, independent
DeliveryExactly once, by the callAt-least-once — idempotency requiredAt-least-once — idempotency on every consumer
OrderingCall order, by constructionBest effort (FIFO queues excepted)Ordered within a partition, not across them
HistoryNone — the response is the recordNone — the message is deletedThe log is the record; replayable
Failure visibilityIn the request that caused itIn the dead-letter queue, laterIn the dead-letter queue, later
AtomicityOne transaction, freeWrite + enqueue need an outboxWrite + publish need an outbox
New reader costChange the callerAdd a queueAttach to the log, no producer change
Operational costNone beyond the serviceA broker and retry/DLQ handlingA broker, schema registry, outbox relay, observability
DebuggingStack traceQueue depth + logsConsumer lag + offsets + traces
When it is rightThe caller needs the answerWork can wait, one consumerMany readers, replay, audit

Trade-offs

The queue's risk is invisible until the duplicate arrives. At-least-once delivery sounds like a footnote and behaves like a bug: the first time a worker crashes between doing the work and acknowledging it, the message is redelivered, and if the handler is not idempotent the customer is charged twice, the email is sent twice, the record is created twice. The fix is one key check, but it has to exist on every handler before the first duplicate, not after. Budget the idempotency work as part of the queue, not as a follow-up ticket.

The log's risk is visible immediately, in the platform. The broker, the schema registry, the outbox relay, the consumer-lag dashboards, the dead-letter handling — these arrive in the first quarter, while the benefits (many readers, replay) only pay off once readers actually attach. A team of five running Kafka for one producer and one consumer is paying the distributed-systems tax without collecting the decoupling benefit. And the failure modes are new kinds of failure: a consumer silently falling behind, a poison event blocking a partition, a schema change that breaks a consumer nobody on the producing team knows exists.

Ordering is the trade-off that decides most cases. If your flows need "this happened after that" — a refund after a charge, a cancellation after a booking — a synchronous call gives it to you for free, a queue gives it to you only in FIFO mode with one consumer, and a log gives it to you only within a partition. Teams underestimate this constantly, because ordering feels like a detail until the day a consumer processes the cancellation before the order exists and has to decide what that means. If ordering matters, name the ordering unit (the order id, the account id) before choosing the tool, and check the tool guarantees it.

Coupling moves; it does not vanish. Request-driven couples caller to callee in time. Queues couple producer to consumer through the message format. Logs couple every consumer to the event schema and the partition key. Each shape has a different coupling, and the right question is never "how do I remove coupling" — it is "which coupling can my team see, test, and change?" A schema change that breaks a consumer in another team's service, discovered in production a week later, is worse coupling than a synchronous call that fails loudly in the request that made it.

Recommendation

For most teams in late 2026: stay request-driven by default, add a queue when a real need appears, and build on a log only when many readers or replay justify it.

Decide by what the caller needs, not by which tool is fashionable What does the caller need? start from the need, not the tech An answer, now the user is waiting Work done later, once fire-and-forget jobs Many readers / replay audit, projections, scale Request-driven sync HTTP / gRPC A queue SQS / workers Event streaming Kafka log + outbox A queue is not a mini-Kafka, and a log is not a queue with better marketing — the need picks the tool.

If the caller needs the answer to proceed, the synchronous call is the answer — the fastest path to a correct system, the cheapest to operate, and the easiest to debug. Spend the effort you saved on timeouts, retries with backoff, and circuit breakers, not on a broker.

If the work can happen later and there is one consumer, add a queue — but add the idempotency key and the dead-letter queue in the same change, not as follow-ups. A queue without either is a duplicate-delivery bug waiting for its first crash.

If many readers need the same fact, or replay and audit have real value, build on the log — with the outbox in the same transaction as the write, additive-only schema evolution, and a partition key chosen from the aggregate id. Kafka 4.0's KRaft mode has made the broker cheaper to run than the ZooKeeper era, but the broker was never the expensive part; the discipline is.

Architecture Decision

>

Decision: Stay request-driven for user-facing reads and writes; route fire-and-forget work through a queue with idempotency keys; adopt a durable event log only for the order lifecycle, where four consumers need the same facts.

>

Context: One product team owns the checkout system. Orders are placed through a synchronous API today; the search index, notifications, analytics, and fraud model all need order facts, and they are currently fed by four separate calls from the checkout service. Core flows (charge, inventory decrement) require atomicity.

>

Options considered: (a) Request-driven everywhere — keep the four calls in checkout. (b) A queue per consumer — checkout publishes to four queues. (c) A single event log (Kafka 4.0, KRaft mode) with an outbox — checkout publishes order.placed once, four consumers attach. (d) Event sourcing for the whole order aggregate.

>

Why this one: Option (a) makes checkout the switchboard and every new reader a checkout change. Option (b) quadruples the publishing code and gives each queue its own ordering and retry story. Option (c) publishes once, adds readers without touching checkout, and the log is the audit trail the support team keeps asking for. Option (d) is more ceremony than the domain needs — the order aggregate does not need to be rebuilt from events, it needs its facts published.

>

What it costs you: A broker to run, an outbox table and relay to maintain, idempotency keys on four consumers, and a schema-evolution discipline — additive changes only, with a registry that rejects breaking ones. Debugging moves from stack traces to consumer lag and offsets.

>

When to reverse it: When the log has fewer than two readers for six months — the decoupling is not being used, and a queue would be cheaper. When a consumer needs an answer from the producer rather than a fact about the past — that is a request, and it should be a call. When the team's on-call load from broker incidents exceeds the integration work the log saved. The reversal trigger is measured — reader count and incident load, not fashion.

When not to use each option

Do not use request-driven calls when the caller does not need the answer and the callee is the bottleneck — a checkout that waits for an analytics write is coupling the user's experience to a system the user will never see. That is the moment for a queue, not for a faster analytics service.

Do not use a queue when the caller needs to know whether the work succeeded — a payment that "probably went through" is not a payment, it is a support ticket. If the user is waiting for the outcome, the call is synchronous, whatever the queue vendor's marketing says.

Do not use an event log when there is one reader. A log with a single consumer is a queue with a larger bill and a schema registry attached, and the day a second reader appears is the day to migrate — not before. Do not use an event log to fix a team problem either: if the real issue is that two teams cannot agree on an API contract, events will not fix it; they will move the disagreement to a schema, where it is harder to find.

And do not adopt event sourcing because the log is there. Publishing facts about what happened is a different decision from rebuilding state from those facts, and the second decision costs far more than the first. Publish the events, keep the database, and let the sourcing decision wait until a consumer genuinely needs to replay history into a new shape.

What to do next

This week, decide by need before you decide by tool:

  • [ ] List every place a caller waits for a service it does not need an answer from — those are your queue candidates
  • [ ] Count the readers of each fact your system publishes; a fact with one reader is a queue, a fact with many is a log candidate
  • [ ] Name the ordering unit (order id, account id) for every flow where "after" matters, and check your tool guarantees it
  • [ ] If you adopt a log, add the outbox and the idempotency keys in the same change — not as follow-ups
  • [ ] Revisit the decision every six months with one question: how many readers does the log actually have, and how much on-call load is it causing?
  • Why This Matters

    Understanding the business and technical context helps you make informed decisions rather than blindly following patterns.

    Trade-offs to Consider

    Every architectural decision involves trade-offs. Consider your specific requirements, team expertise, and scale when evaluating options.

    When NOT to Use This

    Knowing when a solution doesn't apply is as valuable as knowing when it does. Consider alternatives for your specific situation.

    Decision Framework

    Use this framework to evaluate whether this approach is right for your use case based on your specific constraints and requirements.

    Share this articleShare on XShare on LinkedIn

    Keep the decision frameworks coming

    One practical architecture guide a week — patterns, trade-offs, and when not to use them. No spam, unsubscribe anytime.