Function: proxyFetchQueueConsumer()
proxyFetchQueueConsumer(
batch,env):Promise<void>
Defined in: src/proxyFetchQueueConsumer.ts:21
Queue consumer that fetches external APIs and routes responses back to DOs.
This function should be exported as the queue consumer in your Worker:
export default {
async queue(batch: MessageBatch, env: Env) {
await proxyFetchQueueConsumer(batch, env);
}
}
Parameters
batch
MessageBatch
Batch of queue messages
env
Environment with DO bindings for return routing and PROXY_FETCH_QUEUE
Returns
Promise<void>