feat(queue): async delivery via Cloudflare Queues with retry backoff and DLQ

This commit is contained in:
RhenCloud 2026-08-15 14:58:48 +08:00
parent 737dd7af98
commit 486f38365f
No known key found for this signature in database
GPG key ID: A574A617378C4E0B
16 changed files with 702 additions and 22 deletions

View file

@ -0,0 +1,8 @@
import type { Env } from "../lib/types";
import { handleQueueBatch } from "../lib/queue/consumer";
export default defineNitroPlugin((nitroApp) => {
nitroApp.hooks.hook("cloudflare:queue", async ({ batch, env }) => {
await handleQueueBatch(batch, env as Env);
});
});