Skip to main content
Home
This release is 3 versions behind 1.9.1 — the latest version of @fedify/fedify. Jump to latest

Built and signed on GitHub Actions

An ActivityPub/fediverse server framework

This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
94%
Published
a month ago (1.8.13)
class WorkersMessageQueue
implements MessageQueue

Implementation of the MessageQueue interface for Cloudflare Workers Queues binding. This class provides a wrapper around Cloudflare's Queues to send messages to a queue.

Note that this implementation does not support the listen() method, as Cloudflare Workers Queues do not support message consumption in the same way as other message queue systems. Instead, you should use the Federation.processQueuedTask method to process messages passed to the queue.

Constructors

new
WorkersMessageQueue(queue: Queue)

Properties

Cloudflare Queues provide automatic retry with exponential backoff and Dead Letter Queues.

Methods

enqueue(
message: any,
options?: MessageQueueEnqueueOptions,
): Promise<void>
enqueueMany(
messages: any[],
options?: MessageQueueEnqueueOptions,
): Promise<void>
listen(
_handler: (message: any) => Promise<void> | void,
_options?: MessageQueueListenOptions,
): Promise<void>

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@fedify/fedify

Import symbol

import { WorkersMessageQueue } from "@fedify/fedify/x/cfworkers";
or

Import directly with a jsr specifier

import { WorkersMessageQueue } from "jsr:@fedify/fedify/x/cfworkers";

Add Package

pnpm i jsr:@fedify/fedify
or (using pnpm 10.8 or older)
pnpm dlx jsr add @fedify/fedify

Import symbol

import { WorkersMessageQueue } from "@fedify/fedify/x/cfworkers";

Add Package

yarn add jsr:@fedify/fedify
or (using Yarn 4.8 or older)
yarn dlx jsr add @fedify/fedify

Import symbol

import { WorkersMessageQueue } from "@fedify/fedify/x/cfworkers";

Add Package

vlt install jsr:@fedify/fedify

Import symbol

import { WorkersMessageQueue } from "@fedify/fedify/x/cfworkers";

Add Package

npx jsr add @fedify/fedify

Import symbol

import { WorkersMessageQueue } from "@fedify/fedify/x/cfworkers";

Add Package

bunx jsr add @fedify/fedify

Import symbol

import { WorkersMessageQueue } from "@fedify/fedify/x/cfworkers";