All problems

Outbox Publish Failure Is Finalized as Sent

Level 2 · node · Reliability · Failure state transition error

Scenario

An order service outbox worker sends pending events through a message publisher. Normal deliveries work, but operations reports that an event affected by a temporary publisher failure is never retried on the next run, causing the order event to be lost. The worker, publisher, and outbox repository are separated, and failed events must remain pending so they can be retried.

Requirements

- Only events successfully delivered by the publisher are changed to sent - If the publisher fails, that event remains pending - A failed event can be published again on the next worker run - Failure of one event does not stop processing later pending events - Events already marked sent are not published again

Acceptance criteria

  • A successfully published event becomes sent
  • A publish failure leaves the event pending
  • After a temporary failure recovers, the next run successfully publishes the previously failed event
  • Another pending event is still published when one event fails in the same run
  • A sent event is not published again on later runs