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

@zyntra-js/adapter-bullmq

v0.2.4

Published

[![NPM Version](https://img.shields.io/npm/v/@zyntra-js/adapter-bullmq.svg)](https://www.npmjs.com/package/@zyntra-js/adapter-bullmq) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Readme

@zyntra-js/adapter-bullmq

NPM Version License: MIT

The official BullMQ adapter for the ZyntraJS Queues system. This package provides a production-ready driver for handling background job processing using Redis.

Role in the Ecosystem

This adapter acts as a bridge between the abstract @zyntra-js/core Queues system and the powerful BullMQ library. It implements the necessary logic to enqueue, schedule, and process jobs, allowing you to add robust background task capabilities to your ZyntraJS application.

Installation

To use this adapter, you need to install it along with its peer dependencies: bullmq and a Redis client like ioredis.

# npm
npm install @zyntra-js/adapter-bullmq bullmq ioredis

# yarn
yarn add @zyntra-js/adapter-bullmq bullmq ioredis

# pnpm
pnpm add @zyntra-js/adapter-bullmq bullmq ioredis

# bun
bun add @zyntra-js/adapter-bullmq bullmq ioredis

Basic Usage

The primary export of this package is the createBullMQAdapter factory function. You use this to create a jobs instance, which then provides the tools (.router(), .register(), .merge()) to define your background jobs.

1. Create the Adapter and a Job Router

First, create an instance of the adapter and use it to define a router for a specific group of jobs.

// src/services/jobs.ts
import { createBullMQAdapter } from '@zyntra-js/adapter-bullmq';
import { createRedisStoreAdapter } from '@zyntra-js/adapter-redis'; // Often shares a Redis connection
import { Redis } from 'ioredis';
import { z } from 'zod';

// A single Redis client can be used for both Store and Queues
const redis = new Redis(process.env.REDIS_URL);
const store = createRedisStoreAdapter({ client: redis });

// 1. Create the BullMQ adapter instance
export const jobs = createBullMQAdapter({
  store, // The adapter requires a store for the Redis connection
  autoStartWorker: {
    concurrency: 5,
  },
});

// 2. Define a router for email-related jobs
const emailJobRouter = jobs.router({
  namespace: 'emails',
  jobs: {
    sendWelcome: jobs.register({
      input: z.object({ email: z.string().email() }),
      handler: async ({ payload, context }) => {
        context.logger.info(`Sending welcome email to ${payload.email}`);
        // Your email sending logic here...
        return { sent: true };
      },
    }),
  },
});

// 3. Merge all routers into a single configuration
export const REGISTERED_JOBS = jobs.merge({
  emails: emailJobRouter,
});

2. Register with the Zyntra Builder

Pass the REGISTERED_JOBS object to the .jobs() method in your main zyntra.ts file.

// src/zyntra.ts
import { Zyntra } from '@zyntra-js/core';
import { REGISTERED_JOBS } from './services/jobs';

export const zyntra = Zyntra
  .context<AppContext>()
  .jobs(REGISTERED_JOBS)
  .create();

Your background job queue is now configured and ready to use. You can invoke jobs from your actions using zyntra.jobs.emails.schedule({ task: 'sendWelcome', ... }).

For more detailed guides, please refer to the Official ZyntraJS Wiki.

Contributing

Contributions are welcome! Please see the main CONTRIBUTING.md file for details on how to get started.

License

This package is licensed under the MIT License.