TorbatYar/docs/architecture/adr/ADR-006.md
Mortezakoohjani 12c8615615 Ship enterprise Accounting FE/API with CRUD parity and production wiring.
Adds accounting-service PATCH/archive, fiscal helpers, COA templates and setup status, plus SuperApp Accounting UI (DS, scoreboard, masters, vouchers, ledger, ops modules) with session refresh and HTTPS public API URLs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 15:26:43 +03:30

42 lines
1.1 KiB
Markdown

# ADR-006: Transactional Outbox / Inbox for Events
| Field | Value |
| --- | --- |
| Status | Accepted |
| Date | 2025-01-01 |
| Deciders | Platform Architecture |
| Supersedes | — |
| Superseded by | — |
## Context
Services must publish domain events reliably without dual-write failures between DB commits and message brokers.
## Decision
Every service that emits events writes to `outbox_events` in the same business transaction. A worker processes pending outbox rows. Consumers record `inbox_events` by `event_id` for idempotency. Event envelope is `shared.events.EventEnvelope`.
## Consequences
### Positive
- Atomic business + event persistence
- Idempotent consumption
- Message-bus swap later without rewriting producers
### Negative
- Near-real-time, not hard real-time
- Requires Celery/worker ops
## Alternatives Considered
1. Direct broker publish in request path
2. Change-data-capture only
## Related Documents
- [Event-Driven Architecture](../event-driven-architecture.md)
- [Event Catalog](../../reference/event-catalog.md)
- [Services Contracts](../../reference/services-contracts.md)