andreo/eventsauce-outbox
Extended outbox components for EventSauce on PHP 8.2+. Includes an outbox-aware aggregate repository, a forwarding message consumer to dispatch to your queue, and a Symfony Console command to consume relays with batch/commit, sleep, and limit options.
Adopt When:
Look Elsewhere When:
spatie/laravel-outbox or laravel-event-sourcing).spatie/laravel-outbox + EventSauce adapters)."This package extends our EventSauce-based event sourcing with a reliable outbox pattern, ensuring events are safely dispatched to downstream systems even during failures. It decouples event production from consumption, improving scalability and fault tolerance—critical for our microservices roadmap. By leveraging this lightweight solution, we avoid reinventing the wheel, reduce technical debt, and enable eventual consistency for use cases like order processing, notifications, and analytics. The Symfony dependency is manageable (via abstraction or bridge), and the package’s focus on reliability aligns with our goals for resilient, asynchronous workflows."
*"The eventsauce-outbox package provides:
andreo:eventsauce:message-outbox:consume), with configurable batch sizes, retries, and sleep intervals. We’d need to adapt this for Laravel’s Artisan or use a Symfony bridge.ServiceLocator with Laravel’s container) or a bridge.*"Here’s how you’d use this in Laravel:
ServiceLocator with Laravel’s container or a custom locator for the outbox repository.MessageDispatcher to Laravel’s queue system (e.g., using a custom adapter to forward events to Illuminate\Bus\Dispatcher).symfony/console via Composer).foo-relay-id) and run it via Artisan:
php artisan andreo:eventsauce:message-outbox:consume foo-relay-id --batch-size=50
Key gotchas:
How can I help you explore Laravel packages today?