Socket
Book a DemoInstallSign in
Socket

@nerimity/mimiqueue

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nerimity/mimiqueue

NodeJS group queuing library. Requires Redis.

2.1.3
latest
Source
npmnpm
Version published
Weekly downloads
555
56.78%
Maintainers
1
Weekly downloads
 
Created
Source

Mimiqueue

Free, open source NodeJS group queueing library with redis. Currently being used in https://nerimity.com (My chat app)

Features

  • Cluster Support
  • Redis Required
  • Group Queuing
  • Throttle Support (minTime)

Installation

pnpm i redis @nerimity/mimiqueue

Usage

import { createQueue, createQueueProcessor } from "@nerimity/mimiqueue";
import { createClient } from "redis";
import { setTimeout } from "timers/promises";

const redisClient = createClient({
  socket: {
    host: "127.0.0.1",
    port: 6379,
  },
});

const main = async () => {
  await redisClient.connect();

  // NOTE:
  // When running in a cluster, this needs to be ran ONCE in the main thread.
  await createQueueProcessor({
    redisClient,
  });

  const queue = createQueue({
    name: "test-queue",
    redisClient,
    minTime: 1000,
  });

  queue.add(
    async () => {
      await setTimeout(5000);
      return "done";
    },
    { groupName: "someId eg ip address" }
  );

  const status = await queue.add(
    async () => {
      await setTimeout(5000);
      return "done";
    },
    { groupName: "someId eg ip address" }
  );

  console.log(status);
};

main();

FAQs

Package last updated on 30 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.