- What does krak/symfony-messenger-auto-scale actually do?
- It adds elastic, demand-driven scaling to Symfony Messenger consumers. Instead of running a fixed pool of workers, it monitors queue depth and spawns or retires worker processes based on configurable thresholds and min/max bounds. The goal is to drain backlogs quickly during spikes while keeping idle periods cheap.
- Does krak/symfony-messenger-auto-scale work with Laravel?
- No, it is not a Laravel package and has no first-class Laravel support. It is a Symfony Messenger bundle, so using it in a Laravel-first stack means running Symfony Messenger as a parallel messaging runtime inside the application, typically with a hand-rolled service provider. That introduces architectural debt just to get a worker-count convenience feature, which is why infrastructure-level queue-depth scaling is usually a better fit for Laravel teams.
- How does the auto-scaler decide when to add or remove workers?
- According to the package overview, it scales based on real queue size and configurable thresholds, with min and max worker bounds to cap resource usage. It is designed to spawn consumers when backlog grows and retire them when demand drops. The documentation is thin on the exact policy internals, hysteresis, and dampening behavior, so teams should validate scaling behavior under bursty load before relying on it.
- Which Messenger transports are supported for queue-depth scaling?
- The package overview says it works with Redis, AMQP, Doctrine, and other Symfony Messenger transports. However, the documentation does not clearly explain which transports are supported for backlog measurement, how SQS or other transports are handled, or whether it manages processes directly versus delegating to Supervisor. That scope ambiguity matters because queue-depth introspection differs significantly across transports.
- How do I install and configure krak/symfony-messenger-auto-scale?
- Installation is via Composer using the package name krak/symfony-messenger-auto-scale, followed by registering the Symfony bundle in a Symfony application and configuring thresholds and worker bounds through environment variables. There is no Laravel service provider or Laravel-specific configuration path. Laravel teams would need to wire Symfony Messenger and the bundle manually, which is outside the package's supported integration model.
- Which Symfony versions are supported, and is Symfony 7 covered?
- Version 0.1.4 widened the constraint to support Symfony 5 and 6, so Symfony 6.4 LTS is plausibly covered at the Composer constraint level. Symfony 7.x is not covered, which means the package is already one major line behind the current LTS trajectory. Also, a widened composer.json constraint is not the same as a CI matrix, and there is no visible signal that it is tested against Symfony 6.4 or PHP 8.3.
- What production risks should I consider before using this package?
- PHP workers are long-lived and memory-hungry, so aggressive scale-up can multiply resident memory and OOM a node before the scaler reacts. Scale-down races can hard-kill workers mid-message, producing duplicate delivery or lost work depending on transport semantics, and bursty queues can cause worker-count thrashing without hysteresis. The package offers min/max bounds and graceful shutdown, but the documentation is thin on how graceful shutdown interacts with in-flight acknowledgement.
- What are the best alternatives for Laravel teams that need queue-based autoscaling?
- For Laravel Redis queues, Laravel Horizon already provides worker management and autoscaling tied to queue workload. For framework-agnostic infrastructure scaling, KEDA or Kubernetes HPA queue-depth scalers are commonly used and are supported by many platform teams. A fixed Supervisor pool is still a simpler option when traffic is predictable and operational risk matters more than elasticity.
- Is krak/symfony-messenger-auto-scale actively maintained and stable enough for production?
- The package is at v0.1.4, so it is still pre-1.0 and breaking changes are permitted in any minor release. It has a single maintainer, a bus factor of one, and no visible CVE or security review process. The 0.1.4 patch shows the maintainer is responsive to Symfony version churn, but a constraint widening is not evidence of production hardening.
- How does graceful worker shutdown work with in-flight messages?
- The package overview states that it performs graceful worker shutdown so workers can finish in-flight messages before exiting. However, the documentation does not explain how that shutdown sequence interacts with message acknowledgement, transport visibility timeouts, or retry semantics. Because duplicate delivery and lost work are possible if shutdown races with acknowledgement, this behavior should be tested against your specific transport before production use.