{"id":"6b08bd3280884893657cc942","slug":"event-driven-architecture","title":"Event-driven architecture: who publishes, who listens and what can go wrong","summary":"Event-driven architecture in practice: Fowler's four meanings of \"events\", choreography and orchestration, delivery guarantees, the outbox, idempotent consumers, ordering and contracts. Code in C#, TypeScript, Java, Go and Python.","servedLang":"en","availableLangs":["pl","en"],"topics":["event-driven-architecture","microservices","event-sourcing"],"techs":["dotnet","java","typescript","go","python"],"tags":["architecture","events","kafka","outbox","idempotency","sagas","messaging"],"level":"advanced","kind":"article","access":"members","status":"published","cover":null,"author":{"id":"6b08bd2e80884893657cc8cf","name":"Redakcja Art of Devs","avatar":null,"handle":"redakcja","community":false},"readingMinutes":13,"stats":{"views":2,"likes":0,"bookmarks":0,"comments":0},"publishedAt":"2026-11-26T23:13:54.773Z","updatedAt":"2026-11-27T13:11:14.131Z","requestedLang":"en","theme":{"hero":"classic","heroMedia":null,"accent":"teal","background":"dots","weaveResources":true,"toc":"right"},"seoDescription":"Event-driven architecture (EDA): event notification, event-carried state transfer, broker and mediator, saga choreography and orchestration, at-least-once, transactional outbox, inbox and idempotency, Kafka, examples in 5 languages.","wordCount":2428,"doc":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"When someone places an order at Halina's pierogi place, several things happen: the kitchen gets a ticket, the loyalty programme awards points, analytics updates its charts, and the customer gets a text message. In the first version, "},{"type":"text","text":"OrderService","marks":[{"type":"code"}]},{"type":"text","text":" called four services in a row – and when the SMS gateway went down, nobody could place an order. In "},{"type":"text","text":"event-driven architecture","marks":[{"type":"bold"}]},{"type":"text","text":" (EDA), orders just announce the fact \"order placed\", and everything else reacts at its own pace."}]},{"type":"callout","attrs":{"variant":"tip","title":"In short"},"content":[{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Components communicate through "},{"type":"text","text":"events","marks":[{"type":"bold"}]},{"type":"text","text":" – facts from the past – published to a broker; the sender doesn't know who's listening."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"You gain loose coupling and resilience, and pay with "},{"type":"text","text":"eventual consistency","marks":[{"type":"bold"}]},{"type":"text","text":" and harder-to-follow flows."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"The production foundations are: an "},{"type":"text","text":"outbox","marks":[{"type":"bold"}]},{"type":"text","text":" on the sender side, "},{"type":"text","text":"idempotent consumers","marks":[{"type":"bold"}]},{"type":"text","text":", partition keys for ordering and versioned contracts."}]}]}]}]},{"type":"stats","attrs":{"items":[{"value":"4","label":"meanings of \"event-driven\"","hint":"according to Martin Fowler (2017)"},{"value":"≥1","label":"deliveries of every message","hint":"the typical guarantee: at-least-once, so duplicates happen"},{"value":"2011","label":"Kafka goes open source","hint":"LinkedIn releases its event streaming platform"}]}},{"type":"heading","attrs":{"level":2,"id":"context-and-forces"},"content":[{"type":"text","text":"Context and forces"}]},{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Many recipients of one fact","marks":[{"type":"bold"}]},{"type":"text","text":" – kitchen, loyalty, analytics and notifications; tomorrow a fifth one will join."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Independent teams and deployments","marks":[{"type":"bold"}]},{"type":"text","text":" – adding a recipient shouldn't require a change in orders."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Resilience","marks":[{"type":"bold"}]},{"type":"text","text":" – an SMS outage must not block placing orders."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Traffic peaks","marks":[{"type":"bold"}]},{"type":"text","text":" – at 6 p.m. on a Friday, a queue smooths the load instead of knocking the kitchen over."}]}]}]},{"type":"heading","attrs":{"level":2,"id":"four-things-people-call-event-driven"},"content":[{"type":"text","text":"Four things people call \"event-driven\""}]},{"type":"paragraph","content":[{"type":"text","text":"In "},{"type":"text","text":"What do you mean by \"Event-Driven\"?","marks":[{"type":"italic"}]},{"type":"text","text":" (2017), Martin Fowler pointed out that the label covers different patterns:"}]},{"type":"table","content":[{"type":"tableRow","content":[{"type":"tableHeader","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Pattern"}]}]},{"type":"tableHeader","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"What it means"}]}]},{"type":"tableHeader","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Example in the pierogi place"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Event Notification"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"The event only informs; the recipient asks the sender for details if needed"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"OrderPlaced(orderId)","marks":[{"type":"code"}]},{"type":"text","text":" – the kitchen fetches the details through an API"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Event-Carried State Transfer"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"The event carries data, the recipient keeps a local copy and doesn't need to ask"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"OrderPlaced","marks":[{"type":"code"}]},{"type":"text","text":" with lines and phone – Delivery doesn't call Orders"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Event Sourcing"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Events are the source of truth about state"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"the loyalty account stream"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"CQRS"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Separate write and read models, often fed by events"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"the kitchen board as a projection"}]}]}]}]},{"type":"paragraph","content":[{"type":"text","text":"This article focuses on the first two – communication between components. The others are covered in the "},{"type":"text","text":"Event sourcing","marks":[{"type":"link","attrs":{"href":"/en/articles/event-sourcing"}}]},{"type":"text","text":" and "},{"type":"text","text":"CQRS","marks":[{"type":"link","attrs":{"href":"/en/articles/cqrs"}}]},{"type":"text","text":" articles."}]},{"type":"heading","attrs":{"level":2,"id":"structure"},"content":[{"type":"text","text":"Structure"}]},{"type":"diagram","attrs":{"kind":"mermaid","code":"flowchart LR\n  orders[\"Orders<br/>(producer)\"] -- \"orders.order-placed.v1\" --> broker[[\"Broker: Kafka / RabbitMQ / Service Bus\"]]\n  kitchen[\"Kitchen\"] -- \"kitchen.order-ready.v1\" --> broker\n  broker --> k[\"Kitchen<br/>group: kitchen\"]\n  broker --> l[\"Loyalty<br/>group: loyalty\"]\n  broker --> a[\"Analytics<br/>group: analytics\"]\n  broker --> n[\"Notifications<br/>group: notifications\"]\n  broker --> o[\"Orders<br/>group: orders\"]\n  broker -. \"after N failed attempts\" .-> dlq[(\"Dead letter topic\")]","caption":"Broker topology: the sender doesn't know the recipients"}},{"type":"paragraph","content":[{"type":"text","text":"Choreography or orchestration?","marks":[{"type":"bold"}]},{"type":"text","text":" In choreography, every component reacts to events and publishes its own – there's no central conductor (as in the diagram). In orchestration, one component (an orchestrator, process manager or saga) sends commands and waits for replies. Choreography is simpler for short reactions (\"award points\"), orchestration is clearer for multi-step processes with compensation, e.g. catering with a deposit: reserve the date → payment → confirmation, and on a declined payment, release the date."}]},{"type":"heading","attrs":{"level":2,"id":"delivery-guarantees"},"content":[{"type":"text","text":"Delivery guarantees"}]},{"type":"table","content":[{"type":"tableRow","content":[{"type":"tableHeader","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Guarantee"}]}]},{"type":"tableHeader","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"What it means"}]}]},{"type":"tableHeader","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Consequence"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"At-most-once"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"A message may be lost, never repeated"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"fine for metrics, bad for loyalty points"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"At-least-once"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"A message won't be lost, but may arrive more than once"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"the standard; consumers must be idempotent"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Exactly-once"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"In practice: effectively once, thanks to deduplication or broker transactions"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"works within one system (e.g. Kafka Streams), not end to end with an arbitrary database"}]}]}]}]},{"type":"heading","attrs":{"level":2,"id":"what-it-looks-like-in-code"},"content":[{"type":"text","text":"What it looks like in code"}]},{"type":"paragraph","content":[{"type":"text","text":"The dual write problem","marks":[{"type":"bold"}]},{"type":"text","text":": if you save the order to the database and then send the event to the broker, a failure between those steps loses the event (or, in the reverse order, sends an event about an order that doesn't exist). The solution is the "},{"type":"text","text":"transactional outbox","marks":[{"type":"bold"}]},{"type":"text","text":": the event goes into a table in the same transaction as the order, and a separate process (a relay or CDC, e.g. Debezium) forwards it to the broker."}]},{"type":"codeGroup","attrs":{"title":"A producer with an outbox"},"content":[{"type":"codeBlock","attrs":{"language":"csharp","filename":"PlaceOrderWithOutbox.cs"},"content":[{"type":"text","text":"// The order and the event are saved in ONE transaction. A relay publishes the outbox later.\npublic async Task<Guid> Handle(PlaceOrder cmd, CancellationToken ct)\n{\n    var order = Order.Place(cmd.Phone, cmd.Lines);\n    db.Orders.Add(order);\n    db.Outbox.Add(new OutboxMessage\n    {\n        Id = Guid.NewGuid(),                                     // becomes the message id (for dedup)\n        Type = \"orders.order-placed.v1\",\n        Key = order.Id.ToString(),                               // partition key: per-order ordering\n        Payload = JsonSerializer.Serialize(new OrderPlacedV1(order.Id, order.Phone, order.Total)),\n        OccurredAt = clock.GetUtcNow()\n    });\n    await db.SaveChangesAsync(ct);                               // both rows or neither\n    return order.Id;\n}\n\n// Relay (BackgroundService): SELECT TOP 100 ... WHERE PublishedAt IS NULL ORDER BY OccurredAt,\n// produce to Kafka, then UPDATE PublishedAt. Crashes cause re-sends, never losses -> at-least-once."}]},{"type":"codeBlock","attrs":{"language":"typescript","filename":"place-order.outbox.ts"},"content":[{"type":"text","text":"// The order and the event are saved in ONE transaction. A relay publishes the outbox later.\nexport async function placeOrder(cmd: PlaceOrder): Promise<string> {\n  return prisma.$transaction(async (tx) => {\n    const order = await tx.order.create({ data: toOrderRow(cmd) });\n    await tx.outboxMessage.create({\n      data: {\n        id: crypto.randomUUID(), // becomes the message id (for dedup)\n        type: \"orders.order-placed.v1\",\n        key: order.id, // partition key: per-order ordering\n        payload: { orderId: order.id, phone: order.phone, total: order.total },\n      },\n    });\n    return order.id;\n  });\n}\n\n// Relay: every second read unpublished rows in order, send them with\n// producer.send({ topic, messages: [{ key, value, headers: { \"message-id\": id } }] }),\n// then mark them as published. A crash means a re-send, never a loss."}]},{"type":"codeBlock","attrs":{"language":"java","filename":"PlaceOrderWithOutbox.java"},"content":[{"type":"text","text":"@Service\nclass PlaceOrderHandler {\n    private final OrderRepository orders;\n    private final OutboxRepository outbox;\n    private final ObjectMapper json;\n\n    PlaceOrderHandler(OrderRepository orders, OutboxRepository outbox, ObjectMapper json) {\n        this.orders = orders; this.outbox = outbox; this.json = json;\n    }\n\n    // The order and the event are saved in ONE transaction. A relay publishes the outbox later.\n    @Transactional\n    public UUID handle(PlaceOrder cmd) throws JsonProcessingException {\n        var order = orders.save(Order.place(cmd.phone(), cmd.lines()));\n        outbox.save(new OutboxMessage(\n            UUID.randomUUID(),                                   // message id for dedup\n            \"orders.order-placed.v1\",\n            order.id().toString(),                               // partition key\n            json.writeValueAsString(new OrderPlacedV1(order.id(), order.phone(), order.total())),\n            Instant.now()));\n        return order.id();\n    }\n}\n// Relay: a @Scheduled job (or Debezium reading the outbox table via CDC) publishes and marks rows."}]},{"type":"codeBlock","attrs":{"language":"go","filename":"orders/outbox.go"},"content":[{"type":"text","text":"// PlaceOrder saves the order and the event in ONE transaction; a relay publishes the outbox later.\nfunc (s Service) PlaceOrder(ctx context.Context, cmd PlaceOrder) (string, error) {\n\ttx, err := s.DB.BeginTx(ctx, nil)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer tx.Rollback()\n\n\torderID := uuid.NewString()\n\tif _, err := tx.ExecContext(ctx,\n\t\t`INSERT INTO orders (id, phone, total) VALUES ($1, $2, $3)`, orderID, cmd.Phone, cmd.Total()); err != nil {\n\t\treturn \"\", err\n\t}\n\tpayload, _ := json.Marshal(OrderPlacedV1{OrderID: orderID, Phone: cmd.Phone, Total: cmd.Total()})\n\tif _, err := tx.ExecContext(ctx,\n\t\t`INSERT INTO outbox (id, type, key, payload) VALUES ($1, 'orders.order-placed.v1', $2, $3)`,\n\t\tuuid.NewString(), orderID, payload); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn orderID, tx.Commit()\n}\n\n// Relay goroutine: SELECT ... FOR UPDATE SKIP LOCKED LIMIT 100, publish, UPDATE published_at."}]},{"type":"codeBlock","attrs":{"language":"python","filename":"orders/outbox.py"},"content":[{"type":"text","text":"import json\nimport uuid\n\nfrom sqlalchemy.orm import Session\n\n\ndef place_order(session: Session, cmd: \"PlaceOrder\") -> str:\n    \"\"\"The order and the event are saved in ONE transaction; a relay publishes the outbox later.\"\"\"\n    order = Order.place(cmd.phone, cmd.lines)\n    session.add(order)\n    session.flush()  # assigns order.id\n    session.add(OutboxMessage(\n        id=str(uuid.uuid4()),          # message id for dedup on the consumer side\n        type=\"orders.order-placed.v1\",\n        key=str(order.id),             # partition key: per-order ordering\n        payload=json.dumps({\"order_id\": str(order.id), \"phone\": order.phone, \"total\": str(order.total)}),\n    ))\n    session.commit()                   # both rows or neither\n    return str(order.id)\n\n# Relay: a loop (or a Celery beat task) reads unpublished rows, produces them with\n# confluent_kafka.Producer.produce(topic, key=..., value=..., headers=...), then marks them published."}]}]}]},"toc":[{"id":"context-and-forces","text":"Context and forces","level":2,"locked":false},{"id":"four-things-people-call-event-driven","text":"Four things people call \"event-driven\"","level":2,"locked":false},{"id":"structure","text":"Structure","level":2,"locked":false},{"id":"delivery-guarantees","text":"Delivery guarantees","level":2,"locked":false},{"id":"what-it-looks-like-in-code","text":"What it looks like in code","level":2,"locked":false},{"id":"ordering-contracts-and-observability","text":"Ordering, contracts and observability","level":2,"locked":true},{"id":"trade-offs","text":"Trade-offs","level":2,"locked":true},{"id":"adoption-path","text":"Adoption path","level":2,"locked":true},{"id":"in-practice","text":"In practice","level":2,"locked":true},{"id":"anti-patterns","text":"Anti-patterns","level":2,"locked":true},{"id":"related-topics","text":"Related topics","level":2,"locked":true},{"id":"test-yourself","text":"Test yourself","level":2,"locked":true}],"locked":true,"paywall":null,"previewRatio":0.3,"totalBlocks":39,"visibleBlocks":17,"resources":[{"id":"6b0857be3c96f2d34d0b4235","type":"article","provider":"web","url":"https://learn.microsoft.com/en-us/azure/architecture/guide/architecture-styles/event-driven","embedUrl":null,"title":"Event-Driven Architecture Style","description":"Explore the benefits, challenges, and best practices for event-driven architectures on Azure.","author":"Microsoft Azure Architecture Center","thumbnailUrl":"https://learn.microsoft.com/en-us/media/open-graph-image.png","durationSec":null,"lang":"en","topics":["event-driven-architecture"],"techs":["general"],"tags":["azure","cloud","software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"manual","publishedAt":null,"popularity":70,"verifiedAt":"2026-11-26T11:07:30.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:59.965Z","updatedAt":"2026-11-26T16:00:59.965Z"},{"id":"6b0857be3c96f2d34d0b4214","type":"article","provider":"web","url":"https://www.enterpriseintegrationpatterns.com/patterns/messaging","embedUrl":null,"title":"Messaging Patterns Overview - Enterprise Integration Patterns","description":"This pattern catalog includes 65 integration patterns that we collected from integration projects and updated over two decades. They provide technology-independent design guidance for developers and architects to develop and document robust integration solutions. The 65 messaging patterns are…","author":"Gregor Hohpe","thumbnailUrl":"https://www.enterpriseintegrationpatterns.com/img/eip1_patterns_wide.png","durationSec":null,"lang":"en","topics":["event-driven-architecture"],"techs":["general"],"tags":["software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"manual","publishedAt":null,"popularity":75,"verifiedAt":"2026-11-26T11:26:15.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:59.965Z","updatedAt":"2026-11-26T16:00:59.965Z"},{"id":"6b0857bf3c96f2d34d0b4281","type":"article","provider":"web","url":"https://microservices.io/patterns/data/transactional-outbox.html","embedUrl":null,"title":"Microservices Pattern: Pattern: Transactional outbox","description":"First, write the message/event to a database OUTBOX table as part of the transaction that updates business objects, and then publish it to a message broker.","author":"Chris Richardson (microservices.io)","thumbnailUrl":null,"durationSec":null,"lang":"en","topics":["event-driven-architecture","microservices"],"techs":["general"],"tags":["databases","messaging","software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"manual","publishedAt":null,"popularity":65,"verifiedAt":"2026-11-26T11:25:55.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:02.417Z","updatedAt":"2026-11-26T16:01:02.417Z"},{"id":"6b0857c53c96f2d34d0b480e","type":"video","provider":"youtube","url":"https://www.youtube.com/watch?v=A_mstzRGfIE","embedUrl":"https://www.youtube-nocookie.com/embed/A_mstzRGfIE","title":"Event-Driven Architectures Done Right, Apache Kafka • Tim Berglund • Devoxx Poland 2021","description":"Subscribe to our channel: https://youtube.pl/c/DevoxxPoland?sub_confirmation=1 Far from a controversial choice, Kafka is now a technology developers and architects are adopting with enthusiasm. And it’s often not just a good choice, but a technology enabling meaningful improvements in complex…","author":"Devoxx Poland","thumbnailUrl":"https://i.ytimg.com/vi/A_mstzRGfIE/hqdefault.jpg","durationSec":null,"lang":"en","topics":["event-driven-architecture"],"techs":["general"],"tags":["messaging","software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"youtube-rss","publishedAt":"2022-05-26T14:00:33.000Z","popularity":80,"verifiedAt":"2026-11-26T11:14:49.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:07.480Z","updatedAt":"2026-11-26T16:01:07.480Z"},{"id":"6b0857bf3c96f2d34d0b423c","type":"article","provider":"web","url":"https://microservices.io/patterns/data/saga.html","embedUrl":null,"title":"Microservices Pattern: Pattern: Saga","description":"Implement transactions using a saga, which is a reliably coordinated sequence of local transactions","author":"Chris Richardson (microservices.io)","thumbnailUrl":null,"durationSec":null,"lang":"en","topics":["event-driven-architecture","microservices"],"techs":["general"],"tags":["software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"manual","publishedAt":null,"popularity":70,"verifiedAt":"2026-11-26T11:25:54.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:02.417Z","updatedAt":"2026-11-26T16:01:02.417Z"},{"id":"6b0857c53c96f2d34d0b47fc","type":"video","provider":"youtube","url":"https://www.youtube.com/watch?v=7fkS-18KBlw","embedUrl":"https://www.youtube-nocookie.com/embed/7fkS-18KBlw","title":"Event-Driven Architecture(EDA) vs. Request/Response (RR): System Design Explained","description":"Are you deciding between an Event-Driven Architecture (EDA) and a traditional Request/Response model for your system? This video breaks down the critical differences to help you make the right choice. We'll compare these two architectural patterns across six key factors: reactivity, coupling…","author":"Confluent, an IBM Company","thumbnailUrl":"https://i.ytimg.com/vi/7fkS-18KBlw/hqdefault.jpg","durationSec":null,"lang":"en","topics":["event-driven-architecture"],"techs":["general"],"tags":["software-architecture","system-design","messaging"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"youtube-rss","publishedAt":"2024-04-18T12:59:48.000Z","popularity":82,"verifiedAt":"2026-11-26T10:57:28.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:07.480Z","updatedAt":"2026-11-26T16:01:07.480Z"}],"challenges":[{"id":"6b093dc291bd8fbaf2a0c8d8","slug":"payment-circuit-breaker","title":"Circuit breaker for a payment gateway","summary":"A circuit breaker with closed, open and half-open states, an injected clock, a trial-success threshold and a business-error filter – so a payment gateway outage does not take the whole shop down.","servedLang":"en","availableLangs":["pl","en"],"kind":"code","category":"architecture","status":"published","difficulty":"hard","topics":["circuit-breaker","microservices"],"techs":["typescript","javascript","python","dotnet","java","go"],"tags":["circuit-breaker","resilience","fault-tolerance","state-machine","payments"],"languages":["typescript","javascript","python","csharp","java","go"],"questionCount":null,"xp":40,"stats":{"attempts":0,"solves":0,"solutions":0,"comments":0},"solveRate":null,"publishedAt":"2026-11-27T08:22:26.251Z"},{"id":"6b093dc191bd8fbaf2a0c8d0","slug":"inventory-cqrs","title":"Inventory with CQRS – separate write and read models","summary":"Warehouse commands validated on their own write model, events on a bus and a projection building a read model with a low-stock report. The read model can be rebuilt from events alone.","servedLang":"en","availableLangs":["pl","en"],"kind":"code","category":"architecture","status":"published","difficulty":"medium","topics":["cqrs","event-driven-architecture"],"techs":["typescript","javascript","python","dotnet","java","go"],"tags":["cqrs","read-model","projection","events","inventory"],"languages":["typescript","javascript","python","csharp","java","go"],"questionCount":null,"xp":20,"stats":{"attempts":0,"solves":0,"solutions":0,"comments":0},"solveRate":null,"publishedAt":"2026-11-27T08:22:25.519Z"},{"id":"6b093dc091bd8fbaf2a0c8c0","slug":"event-sourced-account","title":"Event-sourced bank account","summary":"An account aggregate whose state comes only from replaying events, an event store with optimistic concurrency and a repository that saves only new facts. Queries about past state come for free.","servedLang":"en","availableLangs":["pl","en"],"kind":"code","category":"architecture","status":"published","difficulty":"hard","topics":["event-sourcing","cqrs"],"techs":["typescript","javascript","python","dotnet","java","go"],"tags":["event-sourcing","aggregate","event-store","optimistic-concurrency","ddd"],"languages":["typescript","javascript","python","csharp","java","go"],"questionCount":null,"xp":40,"stats":{"attempts":0,"solves":0,"solutions":0,"comments":0},"solveRate":null,"publishedAt":"2026-11-27T08:22:24.935Z"}],"attachments":[],"hasCode":true,"repoUrl":null,"series":[{"slug":"architecture-path","title":"From monolith to microservices","items":[{"slug":"monolith","title":"The Monolith: one application, one deployment, and why it is often the right start","current":false},{"slug":"modular-monolith","title":"The Modular Monolith: hard boundaries without the cost of the network","current":false},{"slug":"layered-architecture","title":"Layered architecture: presentation, logic, data – and where it breaks","current":false},{"slug":"hexagonal-architecture","title":"Pierogi in the Hexagon","current":false},{"slug":"clean-architecture","title":"Clean Architecture: the dependency rule and use cases at the centre","current":false},{"slug":"onion-architecture","title":"Onion architecture: the domain model in the middle, infrastructure outside","current":false},{"slug":"vertical-slice-architecture","title":"Vertical slice architecture: code by feature, not by layer","current":false},{"slug":"cqrs","title":"CQRS: one model for changing, another for reading","current":false},{"slug":"event-sourcing","title":"Event sourcing: store the facts, not just the latest state","current":false},{"slug":"event-driven-architecture","title":"Event-driven architecture: who publishes, who listens and what can go wrong","current":true},{"slug":"microservices","title":"Microservices: independent deployments, real costs and when it pays off","current":false},{"slug":"ddd-strategic-design","title":"DDD strategic design: subdomains, bounded contexts and context maps","current":false}]}],"prev":{"slug":"event-sourcing","title":"Event sourcing: store the facts, not just the latest state"},"next":{"slug":"microservices","title":"Microservices: independent deployments, real costs and when it pays off"},"featured":false,"authorCard":{"id":"6b08bd2e80884893657cc8cf","name":"Redakcja Art of Devs","avatar":null,"handle":"redakcja","headline":"Wzorce projektowe · Architektura · AI i LLM","community":false,"reputation":{"points":3900,"level":{"key":"mentor","label":"Mentor"}},"articles":68,"skills":[{"key":"typescript","title":"TypeScript","level":5,"levelLabel":"Authority","articles":63},{"key":"dotnet","title":".NET","level":5,"levelLabel":"Authority","articles":53},{"key":"python","title":"Python","level":5,"levelLabel":"Authority","articles":52},{"key":"java","title":"Java","level":5,"levelLabel":"Authority","articles":38}]}}