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
Amqp Messenger

Amqp Messenger Laravel Package

symfony/amqp-messenger

AMQP integration for Symfony Messenger, letting you send and receive messages through RabbitMQ and other AMQP brokers. Part of the Symfony framework.

View on GitHub
Deep Wiki
Context7

Symfony AMQP Messenger integrates AMQP brokers (such as RabbitMQ) with Symfony Messenger, enabling reliable, asynchronous message handling in Symfony applications. It provides transport, serialization, and worker support so you can dispatch messages to queues and consume them with dedicated workers.

  • AMQP transport for sending and receiving messages via exchanges and queues
  • Flexible routing with configurable exchange, queue, and binding options
  • Delayed and prioritized messages through per-message and transport settings
  • Native serialization supporting PHP serialization and JSON via Symfony Serializer
  • Worker integration with retry, failure transport, and graceful shutdown support
Frequently asked questions about Amqp Messenger
How do I install symfony/amqp-messenger in a Laravel application?
Install it with composer require symfony/amqp-messenger and add an AMQP transport using a DSN such as amqp://guest:guest@localhost:5672/%2f/messages. Because the package is a Symfony Messenger transport, Laravel also needs Symfony Messenger or a bridge that wires it into the framework. Configure exchanges, queues, and credentials through the transport options or DSN. Then run a Messenger consumer worker rather than a standard Laravel queue worker.
Does symfony/amqp-messenger work with Laravel's native queue system out of the box?
No. It integrates with Symfony Messenger, not Laravel's native Queue facade or queue drivers. To use it, you either adopt Symfony Messenger directly or use a bridge library that maps Laravel jobs to Messenger messages. Existing Laravel queue jobs often need refactoring to implement Messenger's message interface. If you want to keep Laravel's queue API, a native RabbitMQ queue driver is usually a better fit.
Which PHP and Laravel versions does symfony/amqp-messenger v5.4 support?
The 5.4 branch targets PHP 7.2.5 and newer and is maintained as a security-only line, so it is a poor architectural fit for Laravel 10 or 11 on PHP 8.x. Its AMQP transport still works on newer PHP runtimes, but you inherit an old dependency floor and a frozen feature set. For modern Laravel stacks, evaluate the 6.4 or 7.x line in parallel. Staying on 5.4 can become the reason the application cannot move its runtime forward.
Is symfony/amqp-messenger v5.4.54 a security release and should I upgrade?
Yes, v5.4.54 is published under a SECURITY flag and is a CVE-driven, mandatory-adoption update for environments on the 5.4 branch. The visible code change is small: it declares polyfills required on PHP 7.2, with no public API, DSN grammar, transport option, or message-envelope changes. Treat any 5.4.x AMQP transport as unpatched until you verify the upgrade. Confirm the tag your build actually consumes, because release metadata has shown a mismatched tag in this range.
How do I configure a RabbitMQ AMQP DSN for Symfony Messenger?
Use a DSN in the form amqp://user:password@host:5672/%2f/queue_name and pass it to the Messenger transport configuration. Transport options let you define the exchange, queue names, routing behavior, and SSL/TLS settings. Symfony's DSN configuration also supports authentication and connection pooling. Keep credentials out of source control and verify the vhost encoding, especially the %2f default vhost.
Does symfony/amqp-messenger support quorum queues and delayed messages?
Yes, it supports RabbitMQ quorum queues for RabbitMQ v4 and compatible brokers, along with DelayStamp for delayed message processing. Exchange-to-exchange bindings and advanced RabbitMQ topology can be configured without custom transport code. Older RabbitMQ versions will lack delayed quorum queue functionality. The package is optimized for RabbitMQ and does not natively target brokers such as SQS or Kafka.
How do I test the AMQP transport in a Laravel or Symfony application?
Use an in-memory Messenger transport for most unit and feature tests so tests do not depend on a live broker. Keep a smaller integration suite that runs against a real RabbitMQ instance, ideally in a container, to verify DSN parsing, exchange and queue setup, serialization, and envelope stamps. Assert that DelayStamp, retry, and failure-transport behavior match your configuration. This keeps fast tests fast while still catching AMQP-specific regressions.
What production concerns should I check before using AMQP Messenger with RabbitMQ?
Verify connection pooling, SSL/TLS, authentication, and vhost isolation before going live. Run Messenger consumers under a process supervisor and configure retries, failure transports, and dead-letter queues. Design consumers to be idempotent because real-world delivery is typically at-least-once even when the architecture targets exactly-once semantics. Monitor queue depth, consumer lag, and quorum queue health, and test broker failover.
Is the symfony/amqp-messenger 5.4 branch still maintained?
The 5.4 branch is outside Symfony's standard bug-fix window and receives security fixes only. A 2026 security patch on a 5.4 tag means the transport is alive but frozen: expect no upstream features and no non-security fixes. That makes it suitable for legacy applications that need a patched 5.4 line, not for new Laravel builds. Plan an upgrade path to a supported Symfony Messenger line.
What are the alternatives to symfony/amqp-messenger for RabbitMQ in Laravel?
If you want to stay on Laravel's native queue API, use a Laravel RabbitMQ queue driver such as vladimir-yuldashev/laravel-queue-rabbitmq instead of the Symfony Messenger bridge. Other options include Laravel's Redis or database queues when RabbitMQ-specific features like quorum queues are not required. Within Symfony Messenger, you can swap AMQP for other transports, but you keep the Symfony Messenger integration requirement. The right choice depends on whether you need advanced RabbitMQ topology or simpler Laravel-native job handling.
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.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager