npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@babelqueue/redis

v1.0.0

Published

Redis adapter for BabelQueue — a canonical-envelope publisher and a URN-routed consumer over the §1 reliable-queue pattern (RPUSH / BRPOPLPUSH-reserve / LREM-ack) on ioredis.

Readme

@babelqueue/redis

Redis adapter for BabelQueue — a canonical-envelope publisher and a URN-routed consumer over the §1 reliable-queue pattern, so a Redis-based Node service speaks the same wire contract as the PHP, Python and Go SDKs. Implements §1 of the broker-bindings contract.

Redis lists carry no native metadata — the list element is the canonical envelope JSON, byte-for-byte, with no wrapping (unlike @babelqueue/bullmq, which uses BullMQ's own job layout). Produce is RPUSH; consume reserves the head into a <queue>:processing list (BRPOPLPUSH, so an in-flight message survives a crash), routes by URN, and LREMs it on success.

This is a Node-owned reliable queue. Full parity with Laravel's reserved-sorted-set reservation on a shared Redis queue is a separate task — for a mixed PHP+Node fleet, prefer a queue this consumer owns end-to-end.

Install

npm install @babelqueue/redis ioredis

ioredis is an optional peer — you provide the client; an ioredis instance satisfies the adapter structurally.

Produce

import Redis from "ioredis";
import { RedisPublisher } from "@babelqueue/redis";

const client = new Redis("redis://localhost:6379/0");
const id = await RedisPublisher.create(client, "orders").publish("urn:babel:orders:created", { order_id: 1042 });

publish(urn, data, { traceId? }) returns the message meta.id.

Consume

import { RedisConsumer, type BabelHandlers } from "@babelqueue/redis";

const handlers: BabelHandlers = {
  "urn:babel:orders:created": (envelope, raw) => {
    // envelope.data, envelope.trace_id, envelope.attempts ...
  },
};

const consumer = new RedisConsumer(client, "orders", handlers, {
  maxTries: 3,            // requeue with attempts+1, then <queue>.dlq
  onError: (err) => console.error(err),
});

await consumer.run(() => true); // reserve → process → LREM, until you stop it

A successful handler LREMs the element from <queue>:processing. A throwing handler requeues the envelope with attempts + 1 (at-least-once) up to maxTries, then dead-letters to <queue>.dlq with a dead_letter block. Unknown-URN strategy is one of fail / delete / release / dead_letter. poll() and handle(raw) are exposed for testing.

Contract mapping (§1)

| Envelope | Redis | | :--- | :--- | | body | the list element — the canonical envelope JSON, verbatim (no wrapping) | | produce | RPUSH <queue> <envelope> | | reserve | BRPOPLPUSH <queue> <queue>:processing (crash-safe) | | ack | LREM <queue>:processing 1 <element> | | retry | requeue with attempts + 1 (the body owns the count) | | dead-letter | RPUSH <queue>.dlq + dead_letter block |

The envelope is unchanged (schema_version stays 1). The ioredis client is replaced with a fake in the unit suite — no Redis, no network.

License

MIT