cloudflare_compute
Manage Cloudflare Queues from Drupal as configuration, and run Drupal's queue system on them with no code changes. Register a queue that already exists in your Cloudflare account, or provision a new managed one; the module records its name, its Cloudflare-generated id, and the credential set it uses, so the rest of the suite can consume it.
Cloudflare Queues is a managed message queue. This module is the control layer that provisions and tracks queues as Drupal configuration, so you do not have to create or wire up the queue by hand. Its companion, the Cloudflare Queue module, provides a Drupal queue backend (for cron queues, the Batch API, and custom queue workers) that runs on a provisioned queue.
Features
- A cloudflare_queue configuration entity: each queue is stored as configuration (its name, its Cloudflare-generated id, and the credential set it uses). No secret is stored in configuration.
- A queue provisioning primitive (provider, catalog, and asset kind) that the Cloudflare-for-Drupal provisioning engine uses to create, reconcile, and register queues.
- An administration UI at Configuration > Web services > Cloudflare > Cloudflare Queues to add, edit, and delete queues.
- Read-only-token safe: listing and status checks degrade gracefully when the API token cannot write.
Post-Installation
- Add a credential set (a Cloudflare account ID and an API token with Queues permission) as described by the Cloudflare SDK module. The token lives in settings.php, never in configuration.
- Go to Configuration > Web services > Cloudflare > Cloudflare Queues and add a queue. Register one that already exists in your account, or mark it managed to have the suite provision it.
- To run a Drupal queue on Cloudflare Queues, install the Cloudflare Queue module and opt a queue onto it in settings.php.
Additional Requirements
Requires the Cloudflare API (cloudflare_api) and Cloudflare SDK (cloudflare_sdk) modules, and a Cloudflare API token with Queues permission. Install with Composer:
composer require drupal/cloudflare_compute
Recommended modules/libraries
- Cloudflare Queue (cloudflare_queue): a Drupal queue backend (ReliableQueueInterface) that runs on a queue provisioned by this module.
Similar projects
Other Drupal queue backends, such as the core database queue or the RabbitMQ and AWS SQS modules, provide a queue implementation but leave you to stand up and wire the broker yourself. Here the queue is provisioned and tracked for you as a configuration entity, and the data plane runs over the Cloudflare Queues HTTP API with no worker or extra service to operate.
Supporting this Module
Issue reports, patches and feedback are welcome in the project's issue queue.
Community Documentation
- Cloudflare Queues: https://developers.cloudflare.com/queues/
- Create a Cloudflare API token: https://developers.cloudflare.com/fundamentals/api/get-started/create-to...