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

@quantabit/job-sdk

v1.0.2

Published

QuantaBit Job Queue SDK - Universal message queue wrapper with Redis/RabbitMQ multi-engine support

Readme

@quantabit/job-sdk (Job Queue SDK)

Universal message queue wrapper SDK supporting rapid migration from monolith to microservices. Internally uses a unified design pattern to seamlessly switch between Redis and RabbitMQ engines, implementing reliable task delivery, consumption, and retry mechanisms.

Features

  • Multi-engine support (Redis and RabbitMQ)
  • Ready to use: Built on bullmq (Redis) / amqplib (RabbitMQ), simplifying complex configurations
  • Standard Payload: Auto-generated taskId, write timestamp throttle
  • Built-in retry/delay queue: Redis engine supports delay and retries parameters directly
  • Full-stack compatible: Works with Node.js, Next.js server, Nest, and Express projects

Installation

cd <your-project>
npm install @quantabit/job-sdk

Quick Start

1. Initialize Engine

Specify engine to switch the backend implementation at any time — business code remains transparent.

import { JobQueue } from "@quantabit/job-sdk";

// Use Redis (default, suitable for common microservices/task distribution)
const jobQueue = new JobQueue({
  engine: "redis",
  config: {
    connection: { host: "127.0.0.1", port: 6379 }, // ioredis config
  },
});

// Use RabbitMQ (suitable for high-throughput, complex dead-letter queue scenarios)
const rabbitQueue = new JobQueue({
  engine: "rabbitmq",
  config: {
    url: "amqp://127.0.0.1", // RabbitMQ connection string
  },
});

2. Publish Task (Publisher)

await jobQueue.connect();

// Unified publish behavior with auto-generated taskId, source info, built-in retry and delay options
const jobId = await jobQueue.publishTask(
  "deploy-queue",
  {
    projectId: "plans",
    repository: "org/repo",
    commitId: "abcdef",
  },
  {
    source: "github-intel-deploy", // Mark source
    retries: 3, // Failed retry count (Redis engine)
    delay: 2000, // Delay 2s before processing (requires backend support)
  },
);

console.log("Task assigned, JobID:", jobId);

3. Consume Task (Consumer)

Regardless of whether you use Redis or RabbitMQ, the handler function signature is consistent.

await jobQueue.connect();

jobQueue.consumeTask(
  "deploy-queue",
  async (data, context) => {
    // data : published payload { projectId, repository, commitId }
    // context: { taskId, source, timestamp, raw } - SDK provides standard context

    console.log(
      `[${context.source}] Received deploy task, Project: ${data.projectId}, TaskID: ${context.taskId}`,
    );

    // Simulate task processing logic; if an error is thrown, auto-enters failed retry pool
    // throw new Error("Deploy failed");
  },
  {
    concurrency: 5, // Concurrent processing count
  },
);

Best Practices & Use Cases

  1. Unified Admin Backend: Dispatch async tasks directly via SDK (e.g., "rebuild full-text index", "batch send emails", "export Excel").
  2. Eco Apps Deployment Pipeline: Listen and execute long-running tasks (e.g., running Python verify_deployment.py) and update cloud services.
  3. Order System Deferred Processing: Use the delay option to auto-cancel unpaid orders after timeout.

🌐 Brand & Links