@axiom-lattice/queue-redis

中文文档
1.1.32发布于 2026/11/03MITTypeScriptESM + CJS近 30 天下载 2776

Redis queue client implementation for Axiom Lattice framework

原始使用文档
文档目录7 节
  1. Overview
  2. Installation
  3. Usage
  4. Basic Usage
  5. Direct Usage
  6. Configuration
  7. License

@axiom-lattice/queue-redis

Redis queue client implementation for the Axiom Lattice framework.

Overview

This package provides a Redis-based queue client implementation that conforms to the QueueClient interface defined in @axiom-lattice/protocols. It can be used with the QueueLatticeManager from @axiom-lattice/core to register and manage Redis-based queue services.

Installation

pnpm add @axiom-lattice/queue-redis

Usage

Basic Usage

import { RedisQueueClient } from "@axiom-lattice/queue-redis";
import { registerQueueLattice } from "@axiom-lattice/core";
import { QueueType } from "@axiom-lattice/protocols";

// Register Redis queue service
registerQueueLattice("redis-queue", {
  name: "Redis Queue Service",
  description: "Redis-based queue service",
  type: QueueType.REDIS,
  queueName: "tasks",
  options: {
    redisUrl: process.env.REDIS_URL || "redis://localhost:6379",
    redisPassword: process.env.REDIS_PASSWORD,
  },
});

// Get and use the queue
import { getQueueLattice } from "@axiom-lattice/core";
const queue = getQueueLattice("redis-queue");

// Push item to queue
await queue.push({ task: "example" });

// Pop item from queue
const result = await queue.pop();

Direct Usage

import { RedisQueueClient } from "@axiom-lattice/queue-redis";

const client = new RedisQueueClient("tasks", {
  redisUrl: "redis://localhost:6379",
  redisPassword: "your-password",
});

// Push item
await client.push({ data: "example" });

// Pop item
const result = await queue.pop();

Configuration

The Redis queue client can be configured via:

  1. Constructor options: Pass redisUrl and redisPassword directly
  2. Environment variables:
    • REDIS_URL (default: redis://localhost:6379)
    • REDIS_PASSWORD (optional)

License

MIT

版本与发布记录

@axiom-lattice/queue-redis 共发布 91 个版本,首次发布于 2025/12/29;过去 12 个月发布了 91 个版本。

版本发布日期距今
1.1.32latest2026/11/034 天前
1.1.312026/11/025 天前
1.1.302026/10/317 天前
1.1.292026/10/299 天前
1.1.282026/10/2810 天前
1.1.272026/10/2612 天前

其他发布通道:hotfix → 1.0.8-hotfix.0。

关于 @axiom-lattice/queue-redis 的常见问题

@axiom-lattice/queue-redis 是什么?

Redis queue client implementation for Axiom Lattice framework

如何安装 @axiom-lattice/queue-redis?

在项目目录运行 npm install @axiom-lattice/queue-redis,或使用 pnpm add / yarn add / bun add。

@axiom-lattice/queue-redis 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@axiom-lattice/queue-redis 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@axiom-lattice/queue-redis 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.10.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@axiom-lattice/queue-redis 可以商用吗?

@axiom-lattice/queue-redis 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@axiom-lattice/queue-redis 的下载量有多少?

根据 npm 官方下载统计,@axiom-lattice/queue-redis 在 2026/10/08 – 2026/11/06 这 30 天内被下载 2,776 次,日均约 93 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@axiom-lattice/queue-redis 还在维护吗?

最新版本 1.1.32 发布于 2026/11/03(4 天前);至今共发布 91 个版本,其中过去 12 个月发布了 91 个;首次发布于 2025/12/29。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。