Skip to content

Conversation

@skie
Copy link
Member

@skie skie commented Jul 15, 2025

Add configurable processor class support to Queue plugin

Allows users to specify custom processor classes in queue configuration while maintaining full backward compatibility. Custom processors must implement Interop\Queue\Processor interface.

Key Features:

  • Optional processor config key for custom processor classes
  • Automatic validation of processor class existence and interface compliance
  • Fallback to default Processor class when no processor specified

Usage:

'Queue' => [
    'timed' => [
        'processor' => \App\Queue\TimedProcessor::class,
    ],
],

Comment on lines +464 to +467
**Important**: The `--processor` command line option is different from the `processor` configuration option:

- **Configuration `processor`**: Specifies the processor class to use for processing messages
- **Command line `--processor`**: Specifies the processor name for Enqueue topic binding (used in `bindTopic()`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we rename the CLI flag to processor-name (can be done separately)? The current overlap is awkward.

@markstory markstory merged commit 76b397b into cakephp:2.x Jul 18, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants