broadway/broadway-saga
Broadway Saga adds saga/process manager support to the Broadway event-sourcing framework. Coordinate long-running business workflows across bounded contexts, reacting to domain events and dispatching commands to drive eventual consistency in CQRS/ES applications.
Illuminate\Events) and queue workers (e.g., Illuminate\Queue).spatie/laravel-event-sourcing), this package could integrate cleanly. If not, additional abstraction may be needed.broadway/broadway) as a dependency, which may not be natively Laravel-friendly (e.g., no Eloquent ORM integration).Bus facade (for commands) and Events system could conflict with Broadway’s command bus. A wrapper layer may be needed to reconcile the two.doctrine/dbal).laravel-doctrine/orm) or custom repository layer would be required.spatie/laravel-transactional-messages for simpler workflows.Bus and Broadway’s CommandBus.| Laravel Feature | Compatibility | Workaround |
|---|---|---|
| Eloquent ORM | ❌ Low (Broadway uses Doctrine) | Use Doctrine ORM or a repository pattern to abstract persistence. |
| Laravel Queues | ⚠️ Partial (can coexist but require routing) | Use a queue listener to dispatch Broadway commands. |
| Events System | ✅ High (Broadway emits events) | Subscribe to Broadway events via Laravel’s Event::listen(). |
| Service Providers | ✅ High (Broadway can register as a Laravel service) | Bind Broadway’s CommandBus to Laravel’s IoC container. |
| Horizon Monitoring | ⚠️ Limited (custom logging needed) | Extend Broadway’s logger to output to Laravel’s log channels. |
broadway/broadway and broadway/broadway-saga.CommandBus.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Broadway worker crashes | Incomplete Sagas, orphaned commands. | Implement dead-letter queues and retry policies. |
| Database connection issues | Event store locks, stalled Sagas. | Use retry logic with exponential backoff. |
| Compensating action fails | Inconsistent state after rollback. | Log failures and trigger manual review. |
| Event sourcing corruption | Lost or duplicated events. | Use checksums or idempotent commands. |
| Laravel/Broadway integration bug | Commands not dispatched, Sagas hang. | Unit test command bus integration. |
How can I help you explore Laravel packages today?