You can reasonably bind up to ~5000 queues (or any other kind of resource) per Worker script today.
You can reasonably bind up to ~5000 queues (or any other kind of resource) per Worker script today.
env["some-queue-" + userId].send(...)?
message.queue gives the name of the queue. I would like to avoid having to pass the queue names as additional variables (next to the bindings)MessageBatch type that contains the messages delivered to the consumer has the queue name: https://developers.cloudflare.com/queues/reference/javascript-apis/#messagebatch
if (msg.queue === env.SOME_QUEUE_BINDING.name) ...staging.some-queue.v1 ) and so on, but was wondering if we could derive the queue name from the binding directlyMessages delivered to a DLQ without an active consumer will persist for four (4) days before being deleted from the queue.

wrangler.toml, etc.
queue.getMessages() to return an array[] will helps us to find if a message already exists with retryqueue.getCount() to return the number of messages currently in queue to wait or move some tasks to other services.message.retryCount() to get if a message is already retried > 3 times to take actionackMessages(Array<ids>) you'd still have to store those IDs / run that operation somewhere, and the costs would be the same (read, delete) as consuming them. This isn't to say there isn't a way to make this more convenient, but it won't land this quarter await env.LIVE_GAME_PRODUCER.send('check for game');max_batch_size set to 1, so not sure if that had an impact, I don't see why it would... all quite strange.
env["some-queue-" + userId].send(...)message.queueif (msg.queue === env.SOME_QUEUE_BINDING.name) ...staging.some-queue.v1 async queue(batch: MessageBatch<Message>, env: Env): Promise<void> {
batch.ackAll();
for (const message of batch.messages) {
const task = message.body as unknown as Task;
// d1.insert(`Running task ${task.id}`);
// Heavy processing here may take upto 1 minute per batch
}
}queue.getMessages()queue.getCount()message.retryCount()ackMessages(Array<ids>)await env.LIVE_GAME_PRODUCER.send('check for game');max_batch_size