Hi, how do I deal with queue consumer timeout issue? i.e. make sure queue consumer completed the ta
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?
14 Replies
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
Ideally queues could allows us to list pending messages
is there a way of getting the name of the queue, when you have the queue object?
Hi everyone! I am starting looking into using queues but have one question...can I configure a worker script as a queue consumer through terraform? I havent found the setup yet..still looking but if anyone here knows or can point me to the info...
it looks like I can configure the queue reference on a worker to send a message but I need to configure the consumer through terraform also.