method WorkersQueue.prototype.process
WorkersQueue.prototype.process<T>(
name: string,
processor: JobProcessor<T>,
options?: ProcessOptions
): void

Registers a processor for a job name.

Registering twice under one name replaces the earlier processor, matching QueueService.process in queue-plugin so the committed port behaves the same way on every backend.

Type Parameters

The payload type

Parameters

name: string

Job name

processor: JobProcessor<T>

Invoked per delivered job

optional
options: ProcessOptions

concurrency bounds how many of one batch's messages for this name run at a time

Return Type

void

Usage

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