Skip to content

v4.6.1 - Custom queue drivers

Latest

Choose a tag to compare

@sylvesterdamgaard sylvesterdamgaard released this 17 Oct 10:04

Fixed

  • Custom queue drivers are recognised by the queue they extend. A connection on a driver registered with Queue::extend() was judged by its driver name, which the package never recognised:

    • A subclass of BackgroundQueue, SyncQueue, DeferredQueue or NullQueue was treated as workable, so its jobs appeared as a workload no worker could run.
    • queue:autoscale:doctor skipped its SQS checks (dotted queue names, missing SLA signal) for a subclass of SqsQueue.
    • A subclass of RedisQueue or DatabaseQueue reached the engine, the cluster summary and the console under its own name, so it was treated as unable to report the oldest job's age and a recovered queue was held as breached.

    A connection on a custom driver is now resolved once per process and judged by the built-in queue it extends. If it cannot be resolved (a broker that is down, missing credentials), or it extends no built-in queue, it is judged by its driver name as before, and a failed resolution is not retried until the process restarts. Connections on built-in drivers are never resolved and behave exactly as before. (#82, by @Orrison)

  • The test suite passes against cboxdk/laravel-queue-metrics 3.5.1, whose calculation reads the job list through JobMetricsRepository::listJobs(). This is a test-only change. (#83, by @Orrison)

Added

  • Support\QueueDriver::of(): the built-in driver a connection behaves as.

Upgrading

No configuration changes. If you use a custom queue driver, the manager now keeps one resolved instance of each such connection open for its lifetime. Restart every queue:autoscale after upgrading.