You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's no indication 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 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 that lets user workers register as queue consumers.
Similarly, there doesn't exist a binding type 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!
The text was updated successfully, but these errors were encountered:
@penalosa Yes, this is for WfP. I've since worked around this by putting the queue consumer in the dispatch worker, and then forwarding all requests in a POST call to the relevant user workers.
Describe the solution
There's no indication 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 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 that lets user workers register as queue consumers.
Similarly, there doesn't exist a binding type 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!The text was updated successfully, but these errors were encountered: