cloudflare / workers-sdk

⛅️ Home to Wrangler, the CLI for Cloudflare Workers®
https://developers.cloudflare.com/workers/
Apache License 2.0
2.58k stars 665 forks source link

🐛 BUG: Queue are not working correctly when you have 2 consumers #4517

Open ssmlee04 opened 9 months ago

ssmlee04 commented 9 months ago

Which Cloudflare product(s) does this pertain to?

Queues

What version(s) of the tool(s) are you using?

3.17.1

What version of Node are you using?

20.10.0

What operating system are you using?

Mac

Describe the Bug

I have a worker that is bound to two queues: one serves as the main queue and the other is intended to be the dead-letter queue.

When I send messages to the main queue, the output from wrangler tail indicates that sometimes the messages are not processed in the main queue, and at other times they are not processed in the dead-letter queue.

Additionally, there are instances when I attempt to send messages via the Queue's GUI and it seems as though the messages are lost and never get processed.

Please provide a link to a minimal reproduction

https://github.com/ssmlee04/worker-queue-demo

Please provide any relevant error logs

No response

samducker commented 1 day ago

Hi having the same issue, did this get resolved? @penalosa

maheshwarip commented 8 hours ago

Hey @samducker, could you give me a bit more info about the issue you're seeing? Are messages not making it into the queue that you're writing to?

Also, just in case could you send me your Queue ID and I can take a look (it's safe to share here).

samducker commented 7 hours ago

Hey @maheshwarip,

Weird situation yesterday - messages weren't queueing after initial setup, despite only modifying consumers, not the producer.

Consumer had some errors (just queue name related), but oddly, no messages were being delivered at all by the producer.

Good news though - updated the consumer today and everything's working now! Still not sure why messages weren't showing up before.

Found the docs a bit tricky and there's not much online, in ways of best practices and working with hono. Happy to chat more if helpful: sam@houseofduck.com and you can let me know of anything I could improve / any feedback on docs.

Queue ID: 51814c09fd2a44da94a29c9214b25249

Cheers!