event-driven

  • A PSR-14 dispatcher, and the listener I could not order

    PSR-14 deliberately says nothing about listener priority, which is a principled decision and occasionally an obstacle. Two listeners on the same event where one must observe the other’s…

  • An outbox relay with a second instance, partitioned

    A single relay process that had become the throughput ceiling, split into two by partitioning on the aggregate identifier. The modulo on a hash of the aggregate id…

  • Message payloads reduced to identifiers, one year on

    A change made in 2024 to send identifiers rather than snapshots, and what a year of it produced. The lookup cost is trivial when the consumer shares a…

  • Message payloads that had grown to 200 KB

    A message carrying the full order including every line, every address and the customer record, because it was easier than a lookup. Fat messages are defended as avoiding…

  • An outbox relay that stalled and told nobody

    A relay process that died on an unhandled exception and left rows accumulating with no error anywhere. The second alert is the one that mattered: the relay stopped…

  • A consumer group rebalance during a deploy

    Every deploy restarting six consumers at once, triggering a rebalance that stops consumption for forty seconds. Rolling the restarts is the obvious answer and it is slower, which…

  • The event nobody consumed, published for two years

    An event published on every order, with no subscribers since the service that listened was removed in 2022. Three events with no subscribers and one and a half…

  • A consumer that stopped on a poison message, on purpose

    A message that cannot be processed and must not be skipped, in a stream where order matters. Halting is the right answer when skipping would corrupt the state…

  • An event between modules, and the coupling it did not remove

    Replacing a direct call with an event felt like decoupling, and the two modules were still deployed together, released together, and broken together. An event removes a compile-time…

  • The read model we built before anybody asked

    A denormalised projection built for a dashboard that was specified, prioritised and then never scheduled. The projection was the right shape for a requirement that did not arrive,…