interface IQueueMessage
Since 0.2.0

One message delivered to a Queues consumer.

A real Cloudflare Message satisfies this structurally. ack() and retry() are the platform's only two dispositions: there is no "dead-letter now" call, because that policy lives in the queue's wrangler.toml stanza.

Properties

readonly
id: string

The platform-assigned message id.

readonly
body: unknown

The message body, as the producer sent it.

readonly
attempts: number

Delivery attempt, 1 on first delivery — the same base as IJob.

Methods

ack(): void

Marks the message processed. It is not redelivered.

retry(options?: { readonly delaySeconds?: number; }): void

Returns the message for redelivery, subject to the queue's configured max_retries and dead-letter queue.

Usage

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