@rxap/nest-rabbitmq
TypeScript icon, indicating that this package has built-in type declarations

10.1.5 • Public • Published

This package provides a NestJS module for integrating with RabbitMQ using exchanges. It offers a client and server implementation for message queuing and supports features like health checks and error serialization. It simplifies the process of setting up and managing RabbitMQ connections and message handling within NestJS applications.

npm version commitizen friendly styled with prettier Libraries.io dependency status for latest release, scoped npm package npm NPM

Installation

Add the package to your workspace:

yarn add @rxap/nest-rabbitmq

Install peer dependencies:

yarn add @nestjs/common @nestjs/config @nestjs/microservices @nestjs/terminus @rxap/utilities amqp-connection-manager amqplib rxjs 

Execute the init generator:

yarn nx g @rxap/nest-rabbitmq:init

Guides

ClientRMQExchange

import { VaultModule, RabbitmqVaultService } from '@rxap/nest-vault';
import { ClientsModule } from '@nestjs/microservices';
import { ClientRmqExchangeModuleOptionsFactory, RABBITMQ_EXCHANGE } from '@rxap/nest-rabbitmq';
import { Logger, Module } from '@nestjs/common';

@Module({
  imports: [
    VaultModule.register(),
    ClientsModule.registerAsync({
      clients: [
        {
          name: RABBITMQ_EXCHANGE,
          useClass: ClientRmqExchangeModuleOptionsFactory,
          extraProviders: [ RabbitmqVaultService, Logger ]
        }
      ],
      isGlobal: true
    })
  ],
})
export class AppModule { }

Generators

init

Initialize the package in the workspace

nx g @rxap/nest-rabbitmq:init

Package Sidebar

Install

npm i @rxap/nest-rabbitmq

Weekly Downloads

26

Version

10.1.5

License

GPL-3.0-or-later

Unpacked Size

98.5 kB

Total Files

37

Last publish

Collaborators

  • badry.muenker
  • mmuenker