Open Source
freyr/message-broker Link to heading
Inbox & Outbox Patterns for Symfony Messenger
A Symfony bundle that brings reliable, transactional event publishing and consumption to your applications. It solves a common problem in distributed systems: ensuring that domain events are published exactly when your business transaction commits, and processed exactly once on the receiving end.
github.com/freyr/message-broker
Key features Link to heading
- Transactional Outbox — Events are saved to the database in the same transaction as your business logic. A worker then publishes them to AMQP asynchronously, guaranteeing at-least-once delivery.
- Inbox Deduplication — Binary UUID v7 primary keys prevent duplicate processing on the consumer side, even when messages are redelivered.
- Typed Message Handlers — Type-safe event consumption with full IDE autocomplete. No manual deserialisation.
- Horizontal Scaling — Multiple workers with database-level
SKIP LOCKEDfor concurrent processing without conflicts.
How it works Link to heading
- Your application dispatches a domain event via Symfony Messenger
- The event is written to an outbox table within your business transaction
- A worker reads the outbox and publishes to AMQP (RabbitMQ)
- On the consumer side, messages are deserialised into typed PHP objects, deduplicated, and routed to handlers — all within a single database transaction
Stack Link to heading
PHP · Symfony Messenger · Doctrine DBAL · AMQP (RabbitMQ) · MIT licence
Early stage — actively under development. Contributions and feedback welcome.