Sumanta Kundu

PHPOutbox - Guaranteed at-least-once event delivery for PHP

by
Stop losing events. PHPOutbox implements the Transactional Outbox Pattern for PHP — guaranteed at-least-once event delivery for Laravel, Symfony, and vanilla PHP applications. - sumantasam1990/PHPOutbox

Add a comment

Replies

Best
Sumanta Kundu
Maker
📌
I'm excited to launch PHPOutbox today. If you are building event-driven PHP applications, you have likely run into the dreaded "dual-write" problem: your database transaction succeeds, but pushing the subsequent event to your queue fails. The result is lost events and inconsistent data. PHPOutbox solves this by implementing the Transactional Outbox Pattern to guarantee at-least-once event delivery. It allows you to store events in the same database transaction as your business data. A background relay then safely picks them up and publishes them to your message broker. Both succeed, or both fail. Key features we built into it: Framework-Agnostic: Core works with raw PDO, but includes first-party adapters (Facades, Commands, ServiceProviders) for Laravel and Symfony. Concurrency Safe: Supports multiple concurrent relay workers using SELECT FOR UPDATE SKIP LOCKED. Resilient: Includes automatic retries with backoff and a dead-letter queue for exhausted messages. Observability: Built-in PSR-3 logging and relay cycle metrics. I built this to bring a robust, standardized outbox solution to the PHP ecosystem. I'd love to hear your feedback, use cases, or any questions you have about the architecture! Let me know what you think in the comments. 👇