How would the first work? What is it meant to return? A queue can have tens of millions of messages.
How would the first work? What is it meant to return? A queue can have tens of millions of messages.
ackMessages(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:

accountTag as defined there.wrangler queues list today (we need to add it to the dash)startDate?
nodejs_compat.{
"data": {
"viewer": {
"accounts": [
{
"queueMessageOperationsAdaptiveGroups": []
}
]
}
},
"errors": null
}{
"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
}const v8 = require('v8');
// Serialize an object into a buffer using v8
function serializeWithV8(obj) {
return v8.serialize(obj);
}
// Convert the Buffer to a byte array (Uint8Array)
const byteArray = new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
// Now you can send the byteArray over the network