Please can I provide some feedback/feature requests for cloudflare queues Firstly the dev experienc
Please can I provide some feedback/feature requests for cloudflare queues
Firstly the dev experience inside workers is pretty great! It would be awesome if it could work with Pages functions so I don't have to deploy separate consumers but thats a nit really.
The metrics in the dashboard are useful but its missing the main one for me, how many messages are in the queue at that point in time, especially important for deadletters
Redriving of deadletter messages, either a button in the UI or a way of doing it via HTTP or JS.
Currently you can pull the messages from the queue via HTTP but can't acknowledge them or push back into the queue locally, meaning I would need to deploy a worker just to redrive each queue which seems excessive and I need to control what I'm redriving or not.
I had to do 200 messages manually this morning
Alerts on the queue length, ie. If messages drop into a deadletter
Would be helpful if the error message was attached to the queue message in some way like SQS does
Being able to send multiple messages via the UI either file upload or pasting in
Documentation is missing for the Preview endpoint in the Queue REST API docs
Its only happened once but I've had one message not get sent, even though it said it has, which worries me slightly.
If possible increase the batch size, up to 200 would be helpful
Alongside this if possible to increase the timeout period as well, I'm running async reports and these can take several minutes to process and so they are timing out/hitting worker limits.
Happy to talk this through or provide more info if π
16 Replies
Unknown Userβ’4mo ago
Message Not Public
Sign In & Join Server To View
Not in the near term. Pages doesnβt have the concept of any non-request handler (cron, queues, tail)
Unknown Userβ’4mo ago
Message Not Public
Sign In & Join Server To View
Hi, how do I deal with queue consumer timeout issue? i.e. make sure queue consumer completed the task with payload? Is there anyway to have queue retry calling consumer unless consumer explicitly acknowledge the payload was processed susessfully?
how can i set proper types for a queue?
like it seems that i need to change it on the generated env types but then i can't have them be generated
more importantly it doesn't work for receiving the messages via the same queue
The TypeScript types for the
queue
handler (your consumer) accept a type parameter - so async queue<T>(batch: MessageBatch, env: Env)
- which will mean that each message in MessageBatch
has a typed payload based on your type parameter T
thanks!
Hey people!
When developing locally, I have configured my queue with following retry timeouts and counts:
I noticed that for some unknown reason, the retry logic only attempts up to 3 times. If I lower the retry_delay to 10 seconds, I can reach 6th attempt. If I finally lower the delay to 2 seconds, I can reach 10 retry attempts which is expected.
Any ideas, why the 30s delay is not working and 2 seconds is? π€
it's possible to list messages inside dead queue?
You can do it via the dashboard. If you want to use http then you could configure a pull consumer for the dlq
So I would need to implement my own api to retrieve the dlq messages?
Cloudflare Docs
Pull consumers | Cloudflare Queues
A pull-based consumer allows you to pull from a queue over HTTP from any environment and/or programming language outside of Cloudflare Workers. A pull-based consumer can be useful when your message consumption rate is limited by upstream infrastructure or long-running tasks.
Cloudflare API Documentation
Interact with Cloudflare's products and services via the Cloudflare API
Thanks
Dead letter queues behave just like normal queues. You could setup a consumer, just like you would with a normal queue. It doesn't necessarily need to be a pull consumer; you could use a worker too.
But I would need to store the messages somewhere
I donβt want to need to add an extra db only for this