symfony/redis-messenger
Redis transport integration for Symfony Messenger, enabling queueing and async message handling backed by Redis. Part of the Symfony ecosystem, with links to contributing, issue reporting, and pull requests in the main Symfony repository.
symfony/messenger and symfony/redis-messenger).Queue implementations or middleware).dispatch(new Job) with Bus::dispatch(new Message).queue:work with Symfony’s MessengerComponent or a custom Laravel command.Stamp system (e.g., SentAtStamp, RetryStamp) may need mapping to Laravel’s ShouldQueue or AfterCommit traits.symfony/http-client, symfony/mailer), integration is straightforward.TransportInterface to Laravel’s Illuminate\Contracts\Queue\Queue.Queue implementations for Laravel’s queue:work.ext-redis. May conflict with Laravel’s native Redis queue driver.symfony/messenger, symfony/redis, and symfony/options-resolver.Message and Stamp systems differ from Laravel’s Job/ShouldQueue. May require dual implementations during migration.FailedJob table. Need to sync retry policies.Illuminate\Bus\Queueable).predis/predis vs. ext-redis).persistent_queues or a backup strategy).queue:failed table may not reflect Symfony’s retry state.php-redis mocks) or contract testing.Illuminate\Contracts\Queue\Queue interface? (e.g., custom RedisQueue class).TransportMessageIdStamp or Laravel’s JobId for deduplication?symfony/monolog-bundle + Prometheus).symfony/options-resolver (for DSN/config validation), symfony/clock (for time-based retries).ext-redis (v6.2+) or ext-relay (for Redis protocol).ext-pcntl (for worker process management).// app/Queues/SymfonyRedisQueue.php
class SymfonyRedisQueue implements Queue
{
use DispatchesJobs;
public function push($job, $data, $queue = null)
{
$message = new AsyncMessage($job, $data);
$this->bus->dispatch($message);
}
// Implement other Queue methods (size, etc.)
}
# config/packages/messenger.yaml
framework:
messenger:
transports:
redis:
dsn: 'redis://localhost:6379/0'
options:
keepalive: true
retry_strategy:
max_retries: 3
delay: 1000
multiplier: 2
routing:
'App\Messages\OrderProcessed': redis
queue:work:
messenger:consume or create a Laravel command:
// app/Console/Commands/ProcessMessages.php
class ProcessMessages extends Command
{
protected function handle()
{
$this->call('messenger:consume', ['transport' => 'redis']);
}
}
dispatch(new Job) with Bus::dispatch(new Message).FailedJob handling to use Symfony’s retry system.laravel:queue:* vs. symfony:messenger:*).Message objects; Laravel uses Job instances. Solution: Implement Serializable or use DHow can I help you explore Laravel packages today?