cloudflare / cloudflare/cloudflare-docs
Document WfP user worker trigger limits
- Dominant language
- MDX
- Stars
- 5.2k
- Forks
- 16.7k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 337
Description
### Describe the solution
There's [no indication](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/) that user-uploaded scripts cannot be queue consumers, however in practice that seems to be the case (please correct me if that's not true or if there's an undocumented workaround!).
The [Create Queue Consumer](https://developers.cloudflare.com/api/operations/queue-v2-create-queue-consumer) endpoint doesn't work if you pass in the name of a user-uploaded script. That script lives within the Workers for Platforms namespace, so it makes sense that the script cannot be found. But there doesn't exist an endpoint [under the Workers for Platforms section](https://developers.cloudflare.com/api/operations/namespace-worker-list) that lets user workers register as queue consumers.
Similarly, there doesn't exist a [binding type](https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings) in the Upload API that binds a user worker to a queue consumer -- the `queue` type only binds workers to queue producers.
If user-uploaded scripts could be bound to a queue consumer, it would unlock some pretty powerful workflows! As it stands, the `queue()` method defined in a user-uploaded worker's default export is currently unreachable, as far as I understand it. Thanks for your time and consideration!
Contributor guide
Assessment
This issue has not been assessed yet.