Every event-driven system eventually meets the same bug. An order is saved, but the OrderCreated event never reaches Kafka. Or the event reaches Kafka twice, and the customer is charged twice.
Repository: https://github.com/josesaid/outbox-demo
Diagrams (English): https://josesaid.github.io/outbox-demo/diagrams/english/workflow-english.html
Diagramas (espaΓ±ol): https://josesaid.github.io/outbox-demo/diagrams/spanish/flujo-espa%C3%B1ol.html
Neither bug shows up in a happy-path test. They appear when a process crashes at the wrong millisecond, or when the broker is unavailable for a few seconds. To see them, you have to cause those failures on purpose.
That is what outbox-demo does. It is a small Java project with no dependencies. Kafka and the database are simulated with plain classes, so you can run it with javac and watch every step in the log. It runs five scenarios: a normal flow, a relay crash, a consumer crash, a temporary broker failure, and a permanent one.β¦