b2pweb/bdf-queue), enabling support for Gearman, Redis, RabbitMQ, and other drivers under a unified API. This aligns well with Laravel’s native queue system (which also supports multiple drivers like database, redis, beanstalkd, etc.).symfony/console or symfony/process).symfony/dependency-injection, symfony/config, etc.), which introduces dependency bloat if not already using Symfony components..env + config/queue.php) is simpler than Symfony’s YAML-based approach. Migrating to this bundle would require rewriting configuration and potentially abandoning Laravel’s native queue system.ExpressionLanguage, Config, or DependencyInjection clashing with Laravel’s versions).php artisan queue:work).symfony/process, symfony/console)? If not, the overhead may not justify the switch.no_failure mode align with Laravel’s retry logic?laravel/symfony-bridge or custom integrations) or needing advanced queue consumption (e.g., processing messages from non-Laravel sources).composer.json for Symfony conflicts. If none exist, proceed; otherwise, evaluate alternatives like:
symfony/messenger).Laravel\SymfonyBridge\ServiceProvider to integrate Symfony’s DI into Laravel’s container.// config/app.php
'providers' => [
Laravel\SymfonyBridge\ServiceProvider::class,
],
composer require b2pweb/bdf-queue-bundle
config/app.php (Symfony-style bundles are not natively supported in Laravel; may require custom bootstrapping)..env and config/packages/bdf_queue.yaml as per the README.class BdfQueueDispatcher implements ShouldQueue
{
public function dispatchToBdfQueue($job, $connection = null)
{
$serialized = serialize($job);
$this->bdfQueue->send($connection ?? 'gearman', 'bus', $serialized);
}
}
ReceiverFactoryProviderInterface to auto-register Laravel job handlers:
# config/services.yaml
services:
App\Queue\LaravelJobReceiverFactory:
tags: ['bdf_queue.receiver_factory']
// app/Console/Commands/RunBdfQueueConsumer.php
namespace App\Console\Commands;
use Symfony\Component\Console\Command\Command;
use Bdf\QueueBundle\Command\ConsumeCommand;
class RunBdfQueueConsumer extends Command
{
protected function execute(InputInterface $input, OutputInterface $output)
{
$consumer = new ConsumeCommand();
return $consumer->run(new ArrayInput(['--destination' => 'bus']), new BufferedOutput());
}
}
b2pweb/bdf-queue).database, beanstalkd, sqs, etc. (would require custom drivers).native (PHP serialize) and bdf_json, but mismatches may occur (e.g., closures, resources).Illuminate\Queue\FailedJob system is independent of this bundle’s retry/save mechanisms. A custom listener would be needed to bridge failures.ExpressionLanguage vs. Laravel’s php version).composer’s conflict-resolution or platform-check to enforce compatibility.How can I help you explore Laravel packages today?