jargon

Comparison

Event-carried state transfervsTransactional outbox

Event-carried state transfer

the event carries the whole customer record rather than just an id, so the consumer never has to call back and ask.

Publishing enough state inside each event that consumers can maintain their own copy without querying the producer. It removes the runtime coupling of a callback and makes replay meaningful, because the history contains the values and not just the pointers. The trade is size, staleness semantics and versioning: every consumer is now parsing your schema, so the payload is a contract in a way that an id was not.

Full entry →

Transactional outbox

you write the row and the event to publish into the same database transaction, so you can never commit one without the other.

Persisting outbound messages in a table within the same transaction as the state change, then having a separate process publish them. It closes the dual-write gap where a commit succeeds and the broker publish fails, or vice versa. The publisher is at-least-once by nature, so consumers still need to deduplicate.

Full entry →

Related comparisons