Transactional outbox delivery

Measure the oldest unpublished business event

Queue depth shows volume, but age shows how long a business change has been waiting. Track delivery and consumer completion as separate stages.

In this article

Start the clock at the committed intention

Record when the business transaction created the event. Measure publication delay from that point to confirmed broker acceptance. Keep the timestamp's source and semantics clear, especially if application and database clocks differ.

A publisher's last successful poll does not prove every event is progressing. One malformed row can remain stuck while newer events are delivered successfully.

Track the oldest pending event and the count of unresolved failures. Do not exclude failed rows from age reporting merely because they have moved to a different status.

Separate publication from business completion

Broker acceptance means the message reached the broker under its contract. It does not prove the consumer applied the intended effect. Measure consumer lag or outcome separately where the workflow needs that evidence.

For example, an order event can be published promptly while fulfilment processing is paused. A publication-only dashboard would report success even though the business workflow is delayed.

Use the event identifier to correlate stages. Avoid relying on approximate timestamps or matching payload text when tracing a particular change.

Break down the backlog

Report age by event type, aggregate class or destination where those distinctions affect consequence. A delayed cancellation may deserve different treatment from a delayed analytics update.

Track retry attempts and repeated permanent failures. High attempt volume with little progress can indicate a poison event, invalid credentials or a schema incompatibility rather than insufficient worker capacity.

Include duplicate deliveries and duplicate business effects separately. Duplicate delivery may be expected, while repeated effects indicate a consumer correctness problem.

Tie thresholds to an action

Define what operators do when an event exceeds the agreed delay. The response might restore a destination, isolate a malformed event or pause dependent business work. An alert without a recovery owner creates noise rather than reliability.

Test backlog recovery under realistic incoming traffic. Measure how quickly the oldest event advances, not just the publisher's peak throughput.

Acceptance should show that committed intentions become observable outcomes within the required interval, with failed and uncertain cases still visible. A small queue is not sufficient if the one remaining event has been waiting for days.

Primary sources

AWS: transactional outbox patternAWS: SQS at-least-once delivery

References checked 11 September 2026.