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

Redis Messenger Laravel Package

symfony/redis-messenger

Redis Messenger provides Redis integration for Symfony Messenger, letting you use Redis streams as a transport for sending and consuming messages in your Symfony applications. Lightweight and fast, it's a drop-in option for async message handling.

View on GitHub
Deep Wiki
Context7

symfony/redis-messenger provides Redis integration for Symfony Messenger, letting you transport and process asynchronous messages through Redis streams instead of a traditional queue backend. It plugs into the Messenger component's transport system, so you can configure a Redis-based DSN and dispatch messages with the same interfaces you already use across Symfony.

  • Redis Streams transport with consumer groups for reliable message delivery
  • Configurable DSN, claim intervals, and message TTLs
  • Automatic retry and dead-letter handling via Messenger's retry strategy
  • Works with Symfony's worker command for scalable consumers
  • Maintained alongside the core Symfony framework
Frequently asked questions about Redis Messenger
How do I install symfony/redis-messenger in a Laravel app?
Install it with Composer alongside symfony/messenger, then define a Redis Messenger transport using your Redis DSN and stream name. In Laravel you will typically wire it through a service provider or a custom queue adapter rather than expecting Laravel queue configuration to work automatically. Confirm your Redis client and Symfony Messenger version match your Laravel PHP version.
Does symfony/redis-messenger work with Laravel queues?
It is not a native Laravel queue driver, so Laravel's queue API, job events, and queue:work will not use it out of the box. You can shim it behind a custom Laravel Queue adapter or run Symfony Messenger consumers alongside Laravel queues. Choose that wrapper deliberately because serialization and failure handling differ from Laravel Queueable jobs.
What Redis features does Symfony Redis Messenger use?
It uses Redis streams as the transport, with consumer groups for coordinated consumption and support for delayed retries and message ordering. That design helps with reliable send and receive plus backlog handling compared with simple Redis lists or pub/sub. You still need Redis persistence and monitoring because Redis remains the underlying data store.
How does delayed retry work with Redis Messenger in Laravel?
Retries are handled by Symfony Messenger's retry strategy and backoff settings rather than Laravel's native job retry mechanism. Configure retry limits and delays on the Messenger transport, and ensure your consumer process is running so delayed messages are eventually replayed. Test failure paths because Laravel job:failed events will not fire automatically.
Can I preserve message ordering with symfony/redis-messenger?
Redis streams can preserve order within a stream, and the transport is designed to support message ordering. Ordering can be affected by multiple consumers, retries, and delayed messages, so design your consumer groups and concurrency carefully. If strict global ordering matters, test with your actual worker count and retry policy.
How do I handle message serialization between Laravel jobs and Symfony Messenger?
Symfony Messenger expects Message objects and its own serializer configuration, while Laravel jobs rely on Queueable and Laravel's payload format. You will need an adapter or mapping layer that converts Laravel jobs to Messenger messages and back, or dispatch Messenger messages directly. Be explicit about serializers and versioning so queued messages remain readable after deploys.
Will Laravel Horizon work with Symfony Redis Messenger?
Laravel Horizon is built around Laravel's Redis queue structures, so it will not monitor Symfony Messenger Redis streams out of the box. You can build custom monitoring around Redis stream length, pending entries, consumer groups, and failed messages, or use Symfony Messenger tooling. Plan for operational visibility before moving production traffic.
Is symfony/redis-messenger reliable enough for production in Laravel?
It can be production-ready when Redis is configured with persistence and high availability and when you add retry policies, dead-letter handling, and monitoring. Redis is in-memory, so messages can be lost without RDB/AOF, replication, or snapshots. For Laravel production, treat it as a transport component that needs operational wrappers, not a complete queue platform.
What are alternatives to symfony/redis-messenger for Laravel Redis queues?
Laravel's built-in Redis queue driver and Horizon are the simplest alternatives if you want native job events and monitoring. RabbitMQ or Kafka may fit better for persistent, multi-language, or high-throughput workloads. Symfony Messenger with AMQP or Doctrine transports is another option if you are already adopting Symfony components.
How do I test a Laravel app using Symfony Redis Messenger?
Unit-test handlers and message mapping separately, then use Symfony Messenger's in-memory or test transports where possible to avoid Redis dependencies. For integration tests, run a disposable Redis instance and assert stream consumption, retries, and consumer group behavior. Also test Laravel wrapper code because the bridge itself does not provide Laravel-specific testing helpers.
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.
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log