Skip to main content
Home

@fedify/redis@1.10.2
Built and signed on GitHub Actions

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 Score100%
Downloads21/wk
Published6 days ago (1.10.2)

Redis drivers for Fedify

@fedify/redis: Redis drivers for Fedify

JSR npm

This package provides Fedify's KvStore and MessageQueue implementations for Redis:

import { createFederation } from "@fedify/fedify";
import { RedisKvStore, RedisMessageQueue } from "@fedify/redis";
import { Redis, Cluster } from "ioredis";

// Using a standalone Redis instance:
const federation = createFederation({
  kv: new RedisKvStore(new Redis()),
  queue: new RedisMessageQueue(() => new Redis()),
});

// Using a Redis Cluster:
const federation = createFederation({
  kv: new RedisKvStore(new Cluster([
    { host: "127.0.0.1", port: 7000 },
    { host: "127.0.0.1", port: 7001 },
    { host: "127.0.0.1", port: 7002 },
  ])),
  queue: new RedisMessageQueue(() => new Cluster([
    { host: "127.0.0.1", port: 7000 },
    { host: "127.0.0.1", port: 7001 },
    { host: "127.0.0.1", port: 7002 },
  ])),
});

Installation

deno add jsr:@fedify/redis  # Deno
npm  add     @fedify/redis  # npm
pnpm add     @fedify/redis  # pnpm
yarn add     @fedify/redis  # Yarn
bun  add     @fedify/redis  # Bun
Built and signed on
GitHub Actions

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

Import symbol

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

Import directly with a jsr specifier

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

Add Package

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

Import symbol

import * as redis from "@fedify/redis";

Add Package

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

Import symbol

import * as redis from "@fedify/redis";

Add Package

vlt install jsr:@fedify/redis

Import symbol

import * as redis from "@fedify/redis";

Add Package

npx jsr add @fedify/redis

Import symbol

import * as redis from "@fedify/redis";

Add Package

bunx jsr add @fedify/redis

Import symbol

import * as redis from "@fedify/redis";