Installation
Learn how to install the Custom Queue Manager plugin for Craft CMS.
Requirements
- Craft CMS 5.0.0 or later
- PHP 8.2 or later
Craft Plugin Store
To install Custom Queue Manager, navigate to the Plugin Store in your Craft control panel, search for "Custom Queue Manager," and click Install.
Composer
ddev composer require samuelreichor/craft-custom-queue-manager &&
ddev craft plugin/install custom-queue-manager
composer require samuelreichor/craft-custom-queue-manager &&
php craft plugin/install custom-queue-manager
Register Custom Queues
Custom Queue Manager only monitors custom queues. You need to register at least one custom queue in your config/app.php:
<?php
// config/app.php
return [
'bootstrap' => ['emailQueue'],
'components' => [
'emailQueue' => [
'class' => \craft\queue\Queue::class,
],
],
];
After registering a custom queue, the "Custom Queues" utility will appear under Utilities in the control panel.
Running Custom Queues
Custom queues need to be run separately from Craft's default queue. Each registered queue component gets its own console command using the kebab-case version of the component ID (e.g., emailQueue becomes email-queue):
# Run once
php craft email-queue/run --verbose
# Run as daemon
php craft email-queue/listen --verbose
DDEV Queue Runner
To run custom queues automatically in DDEV, add web_extra_daemons to your .ddev/config.yaml. Each daemon runs as a separate supervisor process that automatically restarts on failure:
web_extra_daemons:
- name: "queue-default"
command: "php /var/www/html/craft queue/listen --verbose"
directory: /var/www/html
- name: "queue-email"
command: "php /var/www/html/craft email-queue/listen --verbose"
directory: /var/www/html
After updating the config, restart DDEV:
ddev restart