Drupal is a registered trademark of Dries Buytaert

queue_processor

134 sites No security coverage
View on drupal.org

Queue Processor automatically processes Drupal queues at the end of page requests, ensuring background tasks run without requiring cron setup. Perfect for sites that need reliable queue processing without dedicated cron jobs.

Features

Non-Blocking Queue Processing
Queue Processor leverages Symfony's kernel.terminate event to process queues after the HTTP response is sent to users, ensuring zero impact on page load times—the same pattern used by Drupal core's automated cron.

Priority-Based Processing
Configure which queues matter most. Set priorities from 0-100 (lower = higher priority) to ensure critical tasks like order confirmations and password resets are processed before lower-priority tasks like search indexing or image optimization.

Granular Time Control

  • Global time limit: Set a maximum execution time (e.g., 5 seconds) to prevent blocking
  • Per-queue time limits: Allocate specific time budgets to individual queues, or let them use remaining global time
  • Smart enforcement: Processing stops gracefully when time limits are reached

Enhanced Queue UI Integration
When the Queue UI module is installed, Queue Processor provides a checkbox interface for selecting queues, automatic queue discovery, and visual queue management—no need to manually type queue names.

Flexible Configuration

  • Enable/disable individual queues
  • Set maximum items to process per queue per request
  • Optionally skip processing on admin routes to reduce overhead
  • Configure everything through an intuitive admin interface

Developer-Friendly

  • Hook system (hook_queue_processor_queues_alter) for runtime queue configuration
  • Comprehensive logging with configurable log levels
  • Automatic legacy configuration migration
  • Full dependency injection and typed properties

Use Cases

  • Email notifications: Process order confirmations and shipping notifications reliably
  • E-commerce sites: Handle payment processing queues, inventory syncs, and price updates
  • Content-heavy sites: Process search indexing and cache warming in the background
  • Sites without cron: Perfect for shared hosting environments where cron isn't available or reliable
  • Development environments: Test queue workers without setting up cron jobs
  • Active sites: Leverage existing traffic to process queues continuously rather than in batches

Post-Installation

After enabling the module, visit Configuration → System → Queue Processor (/admin/config/system/queue-processor) to configure:

  1. Enable automatic queue processing: Turn the feature on (enabled by default)
  2. Set global limits:
    • Items per queue per request: Default 10 (increase for faster processing, decrease for lighter load)
    • Maximum execution time: Default 5 seconds (recommended: 2-3 seconds for high-traffic sites, 10-15 seconds for low-traffic sites)
  3. Configure individual queues: Each available queue appears as an expandable section with:
    • Enable processing: Toggle queue on/off
    • Priority: 0-100 scale (0 = process first, 100 = process last)
    • Time limit: Per-queue maximum in seconds (0 = use remaining global time)
  4. Optional settings:
    • Run on admin routes: Uncheck to skip processing on /admin/* pages (recommended)

Example Configuration:
For an e-commerce site, you might configure:

  • order_confirmation_email - Priority: 5, Time limit: 2 seconds (critical, guaranteed time)
  • shipping_notification - Priority: 10, Time limit: 2 seconds (high priority)
  • product_price_sync - Priority: 40, Time limit: 0 (medium priority, flexible time)
  • search_api_indexing - Priority: 70, Time limit: 0 (low priority, uses leftover time)

Monitoring:
Check Reports → Recent log messages (/admin/reports/dblog) and filter by type "queue_processor" to view:

  • Processing statistics (items processed, duration)
  • Queue suspensions and errors
  • Time limit notifications

Additional Requirements

  • Drupal: 10.x or 11.x
  • PHP: 8.3 or higher

No additional modules, libraries, or external dependencies are required. Queue Processor works with Drupal core's Queue API out of the box.

Queue UI
Highly recommended. Provides enhanced queue management capabilities and integrates seamlessly with Queue Processor:

  • Visual checkbox interface for queue selection (vs. manual text entry)
  • Automatic queue discovery and listing
  • Comprehensive queue inspection and management tools
  • Manual queue processing and clearing

When Queue UI is not installed, Queue Processor still works perfectly—you just need to know your queue names and enter them manually.

Similar projects

Ultimate Cron
Provides comprehensive cron job management including queue processing. Ultimate Cron is ideal if you need advanced scheduling, job dependencies, and detailed cron job control. Queue Processor is simpler and lighter-weight, focusing specifically on processing queues after page requests without requiring cron setup.

Advanced Queue
Offers a complete queue backend with database storage, job retry logic, and lease management. Advanced Queue is better for complex queue architectures with specific retry strategies. Queue Processor works with any queue backend and focuses on the processing mechanism rather than queue storage.

Drupal Core Automated Cron
Core's automated cron runs all cron tasks (not just queues) at intervals. Queue Processor uses the same kernel.terminate pattern but provides:

  • Queue-specific processing (not all cron tasks)
  • No minimum interval requirement (processes on every eligible request)
  • Priority ordering and per-queue time limits
  • Granular control over which queues to process

Key Differentiator: Queue Processor is the only solution that combines priority-based processing, per-queue time limits, and traffic-driven execution without requiring cron configuration.

API for Developers

hook_queue_processor_queues_alter()

Modify queue configurations at runtime:

/**
 * Implements hook_queue_processor_queues_alter().
 */
function mymodule_queue_processor_queues_alter(array &$queues): void {
  // Boost email queue priority during business hours.
  foreach ($queues as &$queue) {
    if ($queue['id'] === 'email_queue' && date('H') >= 9 && date('H') <= 17) {
      $queue['priority'] = max(0, $queue['priority'] - 20);
    }
  }
}

Programmatic Configuration

use Drupal\Core\Config\ConfigFactoryInterface;

$config = \Drupal::configFactory()->getEditable('queue_processor.settings');

$config->set('queues', [
  [
    'id' => 'my_custom_queue',
    'enabled' => TRUE,
    'priority' => 25,
    'time_limit' => 3,
  ],
])->save();

Activity

Total releases
2
First release
Nov 2025
Latest release
3 months ago
Release cadence
3 days
Stability
0% stable

Releases

Version Type Release date
1.0.0-alpha1 Pre-release Dec 1, 2025
1.0.x-dev Dev Nov 28, 2025