Socket
Socket
Sign inDemoInstall

nestjs-rabbitmq

Package Overview
Dependencies
42
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    nestjs-rabbitmq

nest rabbitmq module


Version published
Maintainers
1
Install size
7.60 MB
Created

Readme

Source

Nestjs Rabbitmq

Rabbitmq component for NestJs.

Installation

Yarn

yarn add nestjs-rabbitmq

NPM

npm install nestjs-rabbitmq --save

Getting Started

Let's import the RabbitMqModule in app.module.ts

import { Module } from '@nestjs/common';
import { RabbitMqModule} from 'nestjs-rabbitmq'

@Module({
    imports: [
        RabbitMqModule.forRoot(options)
    ],
})
export class AppModule {}

With Async

import { Module } from '@nestjs/common';
import { RabbitMqModule} from 'nestjs-rabbitmq'

@Module({
    imports: [
        RabbitMqModule.forRootAsync({
            useFactory: (configService: ConfigService) => configService.get('rabbitmq'),         // or use async method
            //useFactory: async (configService: ConfigService) => configService.get('rabbitmq'),
            inject:[ConfigService]
        }),
    ],
})
export class AppModule {}

Options

interface RabbitMqModuleOptions {
  user?: string,    //Default guest
  passwd?: string,  //Default guest
  host?: string,    //Default localhost
  port?: number     //Default 5672
}

That's it!

Keywords

FAQs

Last updated on 18 Apr 2022

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc