Testing event-driven systems and message brokers
Follow an event from send to saved effect. Test repeats, order, crash recovery and the actual failure route.
L1–L4 are part of the Pro pass
L0 Explain simply
Analogy: a post office sorting room. Tom tests Daily List, a made-up to-do list app. Think of each task change as a numbered letter. A sorting room takes the letter, then a clerk uses it to update a reminder list.
The receipt at the counter proves one step. It does not prove the clerk has changed the list. Tom checks both, rather than treating the receipt as the finished job.
A is a service that carries messages between parts of an app. The sender is a producer. The receiver is a consumer. These parts can work at different times.
Now suppose the clerk changes the list, then falls asleep before marking the letter done. Another clerk may read the same letter again. The app needs a rule for that repeat. In this story, one task must still have one reminder.
A special tray can hold letters that need help. But only if the route to that tray exists. A bad message does not build its own safe place to wait.
The picture has limits. Kafka keeps a record that readers can read again. A RabbitMQ work queue usually removes work after the receiver marks it done. Neither is a promise that all app data agrees at once, or that no message can be lost.
Tom's first move is to ask: which step did we observe, and which result do we still need?
PLAIN WORDS · 1 in this section
- kafka
- software for streaming messages between systems
PICTURE IT
The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.
THE REAL JOB Follow a message from the sender through the broker to the saved business effect, including repeats and failures.
- Trace
- Settle
- Count
HOW THE PICTURE MAPS
| In the picture | In the software |
|---|---|
| The numbered letter | A message with a stable event ID across delivery attempts |
| The sorting room | The broker that stores or routes messages |
| The receipt at the counter | Broker acceptance, not proof of a finished business task |
| The clerk updates the reminder list | The consumer saves the intended effect |
| The special tray and its route | A failure destination that must be set up and tested |
WHERE THIS PICTURE STOPS
- Kafka keeps a log that readers can revisit; a work queue has different removal rules.
- A broker receipt does not prove a saved result, and a configured error route can still fail.
- The picture does not promise one order for all messages or a fixed time for views to agree.
HOOK
Trace, settle, count.
TELL A FRIEND
The sorting room receipt is only one step. Follow the numbered letter to the saved reminder, then check repeats and the failure route.
OFTEN MIXED UP WITH Work that happens later: jobs and queues. That topic covers work that happens later. This one covers a broker that connects services.
Sources & standards — 2 sources
- Market practice4.1
Apache Kafka 4.1: Introduction ↗ — Apache Software Foundation · Main concepts; topics, retention and partition order. Read 8 November 2026.
Opened official page and read the named substantive sections. Teaching fixtures are authored synthetic examples, not executed broker results.
- Market practicePublic Python tutorial read 8 November 2026
RabbitMQ tutorial: Work queues ↗ — RabbitMQ / Broadcom · Competing workers, manual acknowledgements and redelivery after consumer loss. Read 8 November 2026.
Opened official page and read the named substantive sections. Teaching fixtures are authored synthetic examples, not executed broker results.
PRACTISE AND KEEP
Sources for this topic — 10 sources
- Market practice4.1
Apache Kafka 4.1: Introduction ↗ — Apache Software Foundation · Main concepts; topics, retention and partition order. Read 8 November 2026.
Opened official page and read the named substantive sections. Teaching fixtures are authored synthetic examples, not executed broker results.
- Market practice4.1
Apache Kafka 4.1: Design and delivery semantics ↗ — Apache Software Foundation · Consumer position, Message Delivery Semantics and Using Transactions; external outputs require coordination. Read 8 November 2026.
Opened official page and read the named substantive sections. Teaching fixtures are authored synthetic examples, not executed broker results.
- Market practice4.1
Apache Kafka 4.1: Producer configuration ↗ — Apache Software Foundation · acks, enable.idempotence, max.in.flight.requests.per.connection and transactional.id. Read 8 November 2026.
Opened official page and read the named substantive sections. Teaching fixtures are authored synthetic examples, not executed broker results.
- Market practice4.4 edition displayed on 8 November 2026
RabbitMQ: Consumer acknowledgements and publisher confirms ↗ — RabbitMQ / Broadcom · Publisher confirms versus consumer acknowledgements; automatic requeueing; unroutable mandatory messages. Read 8 November 2026.
Opened official page and read the named substantive sections. Teaching fixtures are authored synthetic examples, not executed broker results.
- Market practice4.4 edition displayed on 8 November 2026
RabbitMQ: Dead letter exchanges ↗ — RabbitMQ / Broadcom · Triggers, configuration, missing exchange, safety, republishing with confirms and x-death history. Read 8 November 2026.
Opened official page and read the named substantive sections. Teaching fixtures are authored synthetic examples, not executed broker results.
- Market practice4.4 edition displayed on 8 November 2026
RabbitMQ: Queues ↗ — RabbitMQ / Broadcom · Message ordering, durability, exclusive queues and resource boundaries. Read 8 November 2026.
Opened official page and read the named substantive sections. Teaching fixtures are authored synthetic examples, not executed broker results.
- Market practicePublic Python tutorial read 8 November 2026
RabbitMQ tutorial: Work queues ↗ — RabbitMQ / Broadcom · Competing workers, manual acknowledgements and redelivery after consumer loss. Read 8 November 2026.
Opened official page and read the named substantive sections. Teaching fixtures are authored synthetic examples, not executed broker results.
- Market practicePublic architecture guidance read 8 November 2026
Event-driven architecture style ↗ — Microsoft · Producers, consumers, channels, partitioned streams and decoupled state. Read 8 November 2026.
Opened official page and read the named substantive sections. Teaching fixtures are authored synthetic examples, not executed broker results.
- Market practicePublic architecture guidance read 8 November 2026
Event Sourcing pattern ↗ — Microsoft · Problems and considerations: eventual consistency, event versioning, ordering, idempotency and testing. Event sourcing is distinct from using a broker. Read 8 November 2026.
Opened official page and read the named substantive sections. Teaching fixtures are authored synthetic examples, not executed broker results.
- Market practice4.4 edition displayed on 8 November 2026
RabbitMQ: Quorum queues and dead-letter safety ↗ — RabbitMQ / Broadcom · Dead Lettering: Activating at-least-once Dead-Lettering, Limitations and Caveats; at-most-once default and retry duplicates. Read 8 November 2026.
Opened the official guide and read Dead Lettering, activation, limitations and caveats. Teaching fixtures are synthetic examples, not live broker results.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.