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.

QueueMessageOperationsByMinute from the example (https://developers.cloudflare.com/queues/reference/metrics/), with these variables:

if (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{
"data": {
"viewer": {
"accounts": [
{
"queueMessageOperationsAdaptiveGroups": []
}
]
}
},
"errors": null
}QueueMessageOperationsByMinute{
"accountTag": "xxx",
"queueId": "dev-event-batch-queue",
"datetimeStart": "2024-01-24T00:00:00Z",
"datetimeEnd": "2024-01-24T23:59:00Z"
}query {
viewer {
accounts(filter: { accountTag: $accountId }) {
queueMessageOperationsAdaptiveGroups(
limit: 10000
filter: { date_geq: $startDate, date_leq: $endDate }
orderBy: [date_DESC]
) {
count
sum {
bytes
}
dimensions {
queueId
date
}
}
}
}
}{
"data": {
"viewer": {
"accounts": [
{
"queueMessageOperationsAdaptiveGroups": [
{
"count": 2446,
"dimensions": {
"date": "2024-01-24",
"queueId": "e4d7d7e594bd48bbbe49703f72e9c92a"
},
"sum": {
"bytes": 264168
}
}
]
}
]
}
},
"errors": null
}