method IQueueProducer.sendBatch
IQueueProducer.sendBatch(messages: readonly { readonly body: unknown; readonly contentType?: string; }[]): Promise<void>

Enqueues up to 100 messages, at most 256 KB in total.

Parameters

messages: readonly { readonly body: unknown; readonly contentType?: string; }[]

The message bodies, each optionally with its own options

Return Type

Promise<void>

Usage

import { type IQueueProducer } from "cloudflare-plugin/src/index.ts";