Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Symfony Bundle

Symfony Bundle Laravel Package

rabbitevents/symfony-bundle

Symfony bundle integrating RabbitEvents with RabbitMQ, letting Symfony apps publish and handle events between services. Configure exchanges, queues, and listeners via attributes or YAML, with easy publishing and consumption of domain events across distributed applications.

View on GitHub
Deep Wiki
Context7

Symfony Microservices Event Bus using RabbitMQ. Seamlessly publish events and handle them across distributed systems.

Frequently asked questions about Symfony Bundle
What is rabbitevents/symfony-bundle used for?
rabbitevents/symfony-bundle integrates RabbitEvents with RabbitMQ inside Symfony applications. It lets services publish domain events and register listeners that handle those events across distributed systems. You configure exchanges, queues, and listeners through attributes or YAML. It is intended for Symfony microservices, not as a standalone message broker.
How do I install rabbitevents/symfony-bundle?
Install it with Composer using composer require rabbitevents/symfony-bundle. Then enable the bundle in your Symfony application's bundle configuration. You will also need a RabbitMQ broker and connection settings available to the app. Check the repository README for the exact bundle registration and required environment variables.
How do I configure exchanges, queues, and listeners?
The bundle supports configuring exchanges, queues, and listeners through Symfony configuration, including YAML, and through PHP attributes. You define the routing between published events and the queues consumed by listeners in that configuration. Keep exchange and queue names consistent across services that publish and consume the same events. Refer to the package documentation for the exact configuration keys and attribute names.
Can I define listeners with PHP attributes instead of YAML?
Yes, the bundle supports listener configuration via PHP attributes as well as YAML. Attributes let you keep event handling metadata close to the listener class. YAML configuration is useful when you prefer centralized or environment-specific wiring. Both approaches configure the same underlying RabbitMQ exchanges, queues, and handlers.
How do I publish an event from a Symfony service?
Publishing is done through the bundle's publishing services after you configure the relevant exchange and event routing. A Symfony service typically injects the publisher and calls it with a domain event object. The bundle then sends the event to RabbitMQ for subscribed services to consume. The exact publisher interface and event naming should follow the repository documentation.
How do I consume events in a Symfony worker?
Consumption happens through listener classes registered with the bundle and run by a long-lived Symfony console worker. The worker reads from the configured queues and dispatches each message to the matching listener. You should run workers under a process supervisor in production. Check the README for the specific consumer command and worker options.
Does rabbitevents/symfony-bundle work with Laravel?
This package is a Symfony bundle, so it is not a drop-in Laravel package. Laravel applications generally use Laravel-specific RabbitEvents integrations or Symfony Messenger with the RabbitMQ transport. If you are evaluating it for a Laravel codebase, confirm compatibility before adopting it. The repository is the authoritative source for supported frameworks.
How do I test event publishing and handling?
For testing, isolate the publisher and listener code behind interfaces so you can substitute test doubles. Use a disposable RabbitMQ instance or container for integration tests that exercise real exchanges and queues. Assert that published events contain the expected payload and routing metadata. Avoid relying on a shared production broker during automated tests.
What should I consider for production RabbitMQ deployments?
In production, use durable exchanges and queues where message loss is unacceptable, and configure acknowledgements and retries deliberately. Make consumers idempotent because RabbitMQ can redeliver messages. Monitor queue depth, consumer health, and failed messages. Run workers with a supervisor and plan for graceful shutdowns.
What are alternatives to this bundle for Symfony event buses?
Alternatives include Symfony Messenger with the RabbitMQ transport, Enqueue's RabbitMQ transport, and lower-level libraries such as php-amqplib. Symfony Messenger is often the default choice when you want a framework-native message bus with transports and middleware. This bundle may suit teams already using RabbitEvents conventions or needing its attribute and YAML listener configuration. Compare features, maintenance activity, and operational fit before choosing.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo