eventsauce/message-outbox-for-illuminate
A Laravel/Illuminate outbox for EventSauce that persists domain messages transactionally alongside your business data, then relays them to consumers, avoiding dual-write problems and helping guarantee reliable, at-least-once event delivery.
Adopt when:
Message, dispatcher, consumer interfaces) and understands this is a low-level library, not batteries-included. Expect to write the wiring, the relay loop, and the failure handling yourself.Look elsewhere when:
afterCommit job dispatch (or the database queue driver) covers most of this with far less machinery and no new operational surface.[READ ONLY] subtree split of a monorepo are governance signals, not quality signals. Pin an exact version, assume you own the code, and budget for a fork if the split lapses or the upstream monorepo restructures.To executives: This is insurance against the "order placed, invoice never generated" class of bugs — the ones that surface as support tickets and reconciliation work weeks later. It lets us ship event-driven features (partner webhooks, fulfillment, ledger events) with a real guarantee: if the database commit succeeded, the event will be delivered. The library is free and tiny; the actual cost is a background relay process we must run and monitor — roughly a fraction of an engineer plus on-call attention. Recommend adopting the pattern; treat this specific package as a replaceable implementation detail.
To engineering: It's the Illuminate split of EventSauce's message outbox. It writes messages to an outbox table inside the same transaction as domain state, then relays them to a broker — eliminating the dual-write problem for any feature spanning DB + messaging. Caveats to flag up front: 0 stars, 0 dependents, read-only sub-split, single upstream maintainer, so there is no community safety net; the surface is small enough to vendor or fork if needed. It only pays off if paired with an explicit relay worker, idempotent consumers, dead-letter handling, and pruning — otherwise at-least-once degrades into duplicates plus silent failures, and an unpruned outbox degrades write performance across the whole application. Benchmark it against Laravel's afterCommit dispatch first; for internal-only consumers that is usually the right call. Before committing, get answers on declared illuminate/*/PHP constraints and Laravel 11/12 support, whether a publishable migration ships, the reference relay implementation, the concurrency/locking strategy for multi-worker relays, and the outbox retention story.
Bottom line: The architecture is right and the code surface is small, but this repository is a low-signal distribution artifact — treat the parent EventSauce project as the dependency you are really adopting, and pin, monitor, and plan to fork accordingly.
How can I help you explore Laravel packages today?