Row Diffs Lack Intent

You need to emit OrderCancelled with the cancellation reason and who requested it. Cancelling sets orders.status = 'cancelled' and orders.updated_at; the reason lives in a separate cancellation_requests row written in the same transaction. Six downstream teams will consume the event.

Which approach do you take, and what is the cost of the one you reject?

A

Publish from the application after the transaction commits, because only application code knows the intent and a post-commit publish sees a state that is guaranteed to be durable

B

An outbox table the handler writes in the same transaction, because the handler is the only place where the intent and the reason are both in hand. Reading it off the row diff instead forces every consumer to reconstruct intent from a status transition and couples all six teams to your column names

C

Capture the orders table from the write-ahead log, because the connector emits before and after images and a consumer can diff status to recognise the cancellation, then join cancellation_requests for the reason

D

Capture the write-ahead log and add a database trigger that materialises a denormalised audit row on cancellation, so the connector needs no application changes and existing writers keep working unmodified