Download the PHP package azaharizaman/nexus-outbox without Composer
On this page you can find all versions of the php package azaharizaman/nexus-outbox. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download azaharizaman/nexus-outbox
More information about azaharizaman/nexus-outbox
Files in azaharizaman/nexus-outbox
Package nexus-outbox
Short Description Transactional outbox domain model and publish lifecycle (Layer 1).
License MIT
Informations about the package nexus-outbox
Nexus\Outbox
Layer 1 — transactional outbox domain model and publish lifecycle
This package defines contracts and invariants for the transactional outbox pattern: enqueue integration messages in the same unit of work as business state, then publish asynchronously with explicit pending → sending → sent | failed semantics.
It is not a message broker, queue driver, or database layer. Persistence and workers live in Layer 3 adapters. InMemoryOutboxStore is for tests and single-process use only (not a cross-process concurrency model; L3 should use row locking and unique constraints).
When to use
- You need reliable fan-out to Notifier, webhooks, analytics, or external systems after a successful commit.
- You pair with
Nexus\EventStreamwhen the system of record is an append-only stream but integrators do not consume the stream directly — seedocs/event-stream-bridge.md.
When not to use
- Event sourcing / replay of aggregate history →
Nexus\EventStream. - HTTP command idempotency (replay-safe API results) →
Nexus\Idempotency. - Exactly-once end-to-end delivery — not guaranteed; consumers must be idempotent or deduplicate (this package provides exactly-once intent at enqueue for a given dedup key within tenant scope).
Core types
| Type | Role |
|---|---|
OutboxServiceInterface |
Enqueue, claim next pending, mark sent/failed, schedule retry |
OutboxStoreInterface |
Composite query + persist (split interfaces available) |
OutboxClockInterface |
UTC now() for transitions and lease checks |
InMemoryOutboxStore |
Tests and local simulations |
Example (sketch)
Requirements
- PHP 8.3+
Related documentation
- EventStream bridge
- IMPLEMENTATION_SUMMARY.md