
The Inbox & Outbox Pattern: Reliable Events with Kafka 📬
How to stop losing (and duplicating) events when your service writes to a database and Kafka at the same time.
Nguyen · Hanoi, Vietnam
I build cloud and data systems for a living, chase a ball most evenings, and get lost in history books about my own country in between. I write here mostly about the first one — the things that break, and what they taught me.
nguyen@hanoi:~/writing

$ ls -t posts/ | head -1
How to stop losing (and duplicating) events when your service writes to a database and Kafka at the same time.
Case studies, technical notes, and things I'm thinking about.

How to stop losing (and duplicating) events when your service writes to a database and Kafka at the same time.
When hand-wiring main.go stops scaling, and what Fx's graph resolution and lifecycle ordering buy you in return.
Practical patterns for retries, idempotency, and observability in Lambda-backed product APIs.
Production systems, platform integrations, and data-heavy backend work.

Software Engineer
Maintained and extended a hybrid AWS e-commerce backend spanning Lambda, API Gateway, DynamoDB, EC2, and Aurora.

Software Engineer
Designed distributed backend services for a game publishing platform serving 200K+ monthly active users with real-time, high-concurrency workloads.

Backend Engineer
Designed a lakehouse-style analytics foundation for event ingestion, governed access, and product reporting on AWS.

Backend Engineer
Built a low-latency redirect service with deterministic short-code generation, cache-first reads, and operational safeguards.
One more thing
Most of what I know came from someone pushing back on something I wrote. If a post here doesn't match what you've seen in production, that's the message I most want to get.