# nest-bullmq

> BullMQ wrapper for NestJS

Latest version **1.0.4** (published 2025-08-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install nest-bullmq
pnpm add nest-bullmq
yarn add nest-bullmq
bun add nest-bullmq
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2025-08-23 |
| First published | 2021-07-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 25.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Artico |
| Maintainers | artico |
| Keywords | nest, nestjs, bull, bullmq |

## Links

- npm: https://www.npmjs.com/package/nest-bullmq
- npm.io page: https://npm.io/package/nest-bullmq

## Dependencies (1)

- [bullmq](https://npm.io/package/bullmq.md) ^1.37.1

## Alternatives

- [cron](https://npm.io/package/cron.md) — 4.9M weekly downloads
- [@vercel/queue](https://npm.io/package/@vercel/queue.md) — 731.6K weekly downloads
- [create-sonicjs](https://npm.io/package/create-sonicjs.md) — 1.6K weekly downloads
- [@exellix/jobs-api](https://npm.io/package/@exellix/jobs-api.md) — 941 weekly downloads
- [@forwardimpact/libskill](https://npm.io/package/@forwardimpact/libskill.md) — 575 weekly downloads

## Recent versions

- 1.0.4 (latest) — 2025-08-23
- 1.0.3 — 2021-07-10
- 1.0.2 — 2021-07-10
- 1.0.1 — 2021-07-09
- 1.0.0 — 2021-07-09

## README

<h1 align="center"></h1>

<div align="center">
  <a href="http://nestjs.com/" target="_blank">
    <img src="https://nestjs.com/img/logo_text.svg" width="150" alt="Nest Logo" />
  </a>
</div>

<h3 align="center">Nest-Bullmq – NestJS wrapper for BullMQ</h3>

<div align="center">
  <a href="https://nestjs.com" target="_blank">
    <img src="https://img.shields.io/badge/built%20with-NestJs-red.svg" alt="Built with NestJS">
  </a>
  <a href="https://github.com/nestjsplus/dyn-schematics" target="_blank">
    <img src="https://img.shields.io/badge/Built%20with-%40nestjsplus%2Fdyn--schematics-brightgreen" alt="Built with @nestjsplus/dyn-schematics">
  </a>
</div>

This dynamic module was generated with [Nest Dynamic Package Generator Schematics](https://github.com/nestjsplus/dyn-schematics).  You can read more about using the generator [here](https://github.com/nestjsplus/dyn-schematics).

### Installation

To install this generated project:

```bash
npm install nest-bullmq --save
```

(or yarn equivalent)

### Test

You can test this module against your Redis server (set in the .env file)

```bash
cd ./node_modules/nest-bullmq
npm run start:dev
```

Then connect to [http://localhost:3000](http://localhost:3000) and you should see the status of your BullMQ instance.

### Usage

```javascript
@Module({
  imports: [
    ConfigModule.forRoot(),

    NestBullmqModule.registerAsync({
      imports: [ConfigModule],
      useFactory: (configService: ConfigService) => {
        return {
          connection: ((url) => {
            if (!url) return {};
            url = new URL(url);
            return {
              host: url.hostname,
              port: parseInt(url.port),
              username: url.username,
              password: url.password,
            };
          })(configService.get('REDIS_URL')),
        };
      },
      inject: [ConfigService],
    }),
  ],
})
```
Look at `src/nest-bullmq-client` for more details.

This wrapper is using [bullmq](https://www.npmjs.com/package/bullmq) module, so take a look how to use it.

```javascript
@Controller()
export class NestBullmqClientController {
  constructor(private readonly nestBullmqService: NestBullmqService) {}

  @Get()
  async index() {
    // create instances with options included:
    const flowProducer = this.nestBullmqService.create('FlowProducer')();
    // or create directly
    const Bullmq = this.nestBullmqService.getBullmq();
    const options = this.nestBullmqService.getOptions();
    return new Bullmq.FlowProducer(options);
  }
}
```

Good luck!

---
_Source: https://npm.io/package/nest-bullmq · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
