Skip to main content
Home
Works with
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 Score94%
License
MIT
Downloads279/wk
Published4 hours ago (2.3.2)

AMQP/RabbitMQ driver for Fedify

@fedify/amqp: AMQP/RabbitMQ driver for Fedify

JSR npm

Note

Although it's theoretically possible to be used with any AMQP 0-9-1 broker, this package is primarily designed for and tested with RabbitMQ.

This package provides Fedify's MessageQueue implementation for AMQP, which is supported by RabbitMQ:

Here is an example of how to use it:

import { createFederation } from "@fedify/fedify";
import { AmqpMessageQueue } from "@fedify/amqp";
import { connect } from "amqplib";

const federation = createFederation({
  queue: new AmqpMessageQueue(await connect("amqp://localhost")),
  // ... other configurations
});

The AmqpMessageQueue constructor accepts options as the second parameter, which can be used to configure the message queue:

new AmqpMessageQueue(await connect("amqp://localhost"), {
  queue: "my_queue",
})

For more details, please refer to the docs of AmqpMessageQueueOptions.

Installation

deno add jsr:@fedify/amqp  # Deno
npm  add     @fedify/amqp  # npm
pnpm add     @fedify/amqp  # pnpm
yarn add     @fedify/amqp  # Yarn
bun  add     @fedify/amqp  # Bun

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/amqp

Import symbol

import * as amqp from "@fedify/amqp";
or

Import directly with a jsr specifier

import * as amqp from "jsr:@fedify/amqp";