# Dual Write

Record: `arch:dual-write`
Kind: anti-pattern
Layer: [Enforcement Core](https://banes-lab.com/records/layer/enforcement-core.md)
Severity: discouraged
Scope: event_messaging
Canonical: https://banes-lab.com/ontology#arch-dual-write

## Repair

- Refactored by: transactional_outbox, [saga](https://banes-lab.com/records/lex/saga.md), [idempotent_consumer](https://banes-lab.com/records/arch/idempotent-consumer.md), reconciliation_job
- Detected by: database_write_then_message_publish, two_databases_updated_without_transaction_or_outbox, manual_repair_needed
- Violated by: Write related state to two systems without atomicity, outbox, [saga](https://banes-lab.com/records/lex/saga.md), [reconciliation](https://banes-lab.com/records/lex/reconciliation.md), or compensation.

## referenced-by

- [Outbox Pattern](https://banes-lab.com/records/arch/outbox-pattern.md)
