There is a simple hello world script
There is a simple hello world script that looks like this after connecting
9 Replies
Things should be working fine with Queues. Could you shoot me over your script & wrangler.toml?
I work under the web and don't have much interest in the CLI environment. I went as usual and created a new worker through the dashboard and added bindings to it.
could you send me your consumer code? I'll need more info to help you 🙂 everything you've described should work just fine
you can see
thank you! this ~looks like a bug on our side~ is expected behavior but isn't clearly documented
It's not immediately obvious from the error message, but if you add a Queue handler to your Worker code, it'll work fine again. So if your worker looks something like this:
I tested this code, but it didn't work.
I feel like I'm making a mistake somewhere. Because I want to establish connections like d1, etc. Can you provide a sample code or a complete one that I can use just for testing?
If I can use cf queue feature sooner and produce the data in it, my problem will be solved.
You'll have to name the queue handler function
queue
, rather than q1
. I'd recommend going through the getting started guide here: https://developers.cloudflare.com/queues/get-started/Cloudflare Docs
Get started | Cloudflare Queues
Cloudflare Queues is a flexible messaging queue that allows you to queue messages for asynchronous processing. By following this guide, you will create your first queue, a Worker to publish messages to that queue, and a consumer Worker to consume messages from that queue.