BSFG
Architecture Decision Record

ADR-0003: Idempotency Is Enforced at the Storage Interface

Status: Accepted · Date: 2026-03-03

Status: Accepted

Date: 2026-03-03

Context

Traditional messaging systems often rely on background reconciliation workers or transactional protocols to enforce exactly-once delivery.

These mechanisms introduce coordination dependencies and operational complexity.

BSFG requires duplicate suppression during replay without requiring active reconciliation processes.

Decision

Idempotency is enforced at the Forward Buffer storage interface via an atomic operation:

putIfAbsent(idempotencyKey, payload)

Duplicate detection is based on a stable idempotency key:

The storage layer must guarantee atomic insertion per key.

Consequences

Benefits:

Tradeoffs: