Skip to content

Event-Driven Billing System

Invoices and payments modelled as events, designed so a retry never charges anyone twice.

Status
Shipped
Period
Jun 2026 – Aug 2026
Role
Solo
Stack
  • Kafka
  • Spring
  • PostgreSQL
On this page

The problem

Billing is the one place where "at least once" is not good enough. A retried payment event must never become a second charge.

What I built

An event log of invoice and payment events, with idempotent consumers and a read model rebuilt from the log.

What broke

The first read model assumed events arrive in order. Partition rebalances proved otherwise within a day of load testing.

More builds

Other things I've built

  • Shipped2026

    RabbitMQ Consumer Test Console

    A tool for hitting a message consumer with traffic and watching retries, dead letters and back-pressure in real time.

    Outcome Found two retry storms before they reached production-like load.

    • RabbitMQ
    • Java
    • Spring
    • Observability
  • In progress2026

    My First AI Agent

    An agent that plans and calls tools to finish a job — plus an honest account of where it lost the plot.

    Outcome Handles the lookup work reliably; a person still checks the answer.

    • AI
    • Python
    • LLM

Next

Building something similar?

I am happy to talk about the boring parts — design, failure modes, and the places I would not trust the first version.

Get in touch