Skip to content
Cloudflare Docs

Manage event subscriptions

Learn how to:

  • Create event subscriptions to receive messages from Cloudflare services.
  • View existing subscriptions on your queues.
  • Delete subscriptions you no longer need.

Create subscription

Creating a subscription allows your queue to receive messages when events occur in Cloudflare services. You can specify which source and events you want to subscribe to.

Dashboard

  1. Log in to the Cloudflare dashboard, and go to Compute & AI > Queues.
  2. Select the queue you want to add a subscription to.
  3. Switch to the Subscriptions tab.
  4. Select Subscribe to events.
  5. Name your subscription, and select the desired source and events.
  6. Select Subscribe.

Wrangler CLI

To create a subscription using Wrangler, run the queues subscription create command:

Terminal window
npx wrangler queues subscription create <queue-name> --source <source-type> --events <event1,event2> --<source-specific-option> <value>

To learn more about which sources and events you can subscribe to, refer to Events & schemas.

View existing subscriptions

You can view all subscriptions configured for a queue to see what events it is currently receiving.

Dashboard

  1. Log in to the Cloudflare dashboard, and go to Compute & AI > Queues.
  2. Select the queue you want to view subscriptions for.
  3. Switch to the Subscriptions tab.

Wrangler CLI

To list subscriptions for a queue, run the queues subscription list command:

Terminal window
npx wrangler queues subscription list <queue-name>

Delete subscription

When you delete a subscription, your queue will stop receiving messages for those events immediately.

Dashboard

  1. Log in to the Cloudflare dashboard, and go to Compute & AI > Queues.
  2. Select the queue containing the subscription you want to delete.
  3. Switch to the Subscriptions tab.
  4. Select ... for the subscription you want to delete.
  5. Select Delete subscription.

Wrangler CLI

To delete a subscription, run the queues subscription delete command:

Terminal window
npx wrangler queues subscription delete <queue-name> --id <subscription-id>

Learn more