- Can I use abc/job-server-bundle in Laravel, or is it strictly for Symfony?
- This bundle is designed for Symfony, not Laravel. While you could integrate it via a bridge package (e.g., laravel-symfony-bundle) or manually, Laravel’s native queue system or alternatives like Laravel Horizon are typically better fits. For advanced orchestration, consider extracting core logic into a Laravel-compatible package.
- How does this bundle compare to Laravel’s native queues for job orchestration?
- Laravel’s queues are simpler for basic tasks, but this bundle adds job sequences, batches, cancellations, and a REST API—features lacking in Laravel’s system. However, it requires Symfony’s Doctrine ORM and php-enqueue, adding complexity. Use Laravel queues for simplicity or this bundle for advanced workflows.
- What transport layers (e.g., Redis, RabbitMQ) does abc/job-server-bundle support?
- It uses php-enqueue as the transport layer, supporting AMQP (RabbitMQ), Redis, and others. Laravel’s queue drivers (database, Redis) are incompatible here. If you’re already using php-enqueue, this bundle integrates seamlessly; otherwise, you’ll need to adopt it as a standalone transport.
- Does this bundle work with Laravel’s existing jobs table, or do I need a new database schema?
- This bundle requires its own Doctrine-based schema for job tracking (status, logs, etc.). Laravel’s jobs table won’t map directly. You’d need to either extend Laravel’s schema or create a parallel one, adding maintenance overhead. Test compatibility if sharing a database.
- How do I trigger jobs via the REST API in Laravel? Is there a PHP client included?
- Yes, the bundle includes a JSON REST API with OpenAPI docs and a PHP client library. To use it in Laravel, you’d need to expose the Symfony API endpoints (e.g., via a reverse proxy) or integrate the client library into your Laravel app. Authentication and CORS must be configured separately.
- Can I run cron jobs with this bundle, and what’s the setup like?
- Cron jobs require the separate **AbcSchedulerBundle 2.x**. Configure `cronjob.enabled: true` in the bundle’s YAML and ensure the scheduler bundle is installed. Laravel’s task scheduling (e.g., `schedule:run`) won’t integrate directly; this is a Symfony-specific feature.
- What’s the performance impact of using this bundle vs. Laravel’s queues for high-throughput systems?
- This bundle adds database overhead for job state tracking (status, logs), which may slow high-throughput systems compared to Laravel’s lightweight queues. Benchmark your use case—simple jobs benefit from Laravel’s queues, while complex orchestration justifies the trade-off.
- How do I handle failures or timeouts in distributed jobs across multiple workers?
- The bundle tracks job status and supports cancellations/restarts. For failures, configure retries in php-enqueue’s transport layer. However, Laravel’s queue system (e.g., `failed_jobs` table) offers more built-in failure handling. Monitor worker logs and set up alerts for prolonged job hangs.
- Is there a way to migrate from Laravel’s queues to this bundle without downtime?
- No native migration path exists. You’d need to rewrite job logic to use the bundle’s API and backfill existing jobs into its schema. Plan for a phased rollout: run both systems in parallel, then decommission Laravel’s queues once all jobs are migrated. Test thoroughly for data consistency.
- What are the maintenance risks of using this experimental bundle in production?
- This bundle has low adoption (1 star, no dependents) and is labeled experimental. Symfony updates may break Laravel compatibility, and the lack of activity suggests limited long-term support. Fork the core logic or consider alternatives like Laravel Horizon if stability is critical.