UNPKG

@rxap/nest-amqp

Version:
49 lines (43 loc) 1.79 kB
# @rxap/nest-amqp [![npm version](https://img.shields.io/npm/v/@rxap/nest-amqp?style=flat-square)](https://www.npmjs.com/package/@rxap/nest-amqp) [![commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square)](https://commitizen.github.io/cz-cli/) [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) ![Libraries.io dependency status for latest release, scoped npm package](https://img.shields.io/librariesio/release/npm/@rxap/nest-amqp) ![npm](https://img.shields.io/npm/dm/@rxap/nest-amqp) ![NPM](https://img.shields.io/npm/l/@rxap/nest-amqp) - [Installation](../wiki/#installation) - [Guides](../wiki/#guides) # Installation **Add the package to your workspace:** ```bash yarn add @rxap/nest-amqp ``` **Install peer dependencies:** ```bash yarn add @nestjs/common@10.3.8 @nestjs/config@3.2.2 @nestjs/microservices@10.3.8 @nestjs/terminus@10.2.3 @rxap/nest-utilities@^10.3.8-dev.2 @rxap/utilities@^16.4.1-dev.2 amqp-connection-manager@^4.1.14 amqplib@^0.10.4 joi@17.13.3 rxjs@7.8.1 uuid@^11.0.3 ``` # Guides ## ClientRMQExchange ```typescript import { VaultModule, AmqpVaultService } from '@rxap/nest-vault'; import { ClientsModule } from '@nestjs/microservices'; import { ClientRmqExchangeModuleOptionsFactory, AMQP_EXCHANGE } from '@rxap/nest-amqp'; import { Logger, Module } from '@nestjs/common'; @Module({ imports: [ VaultModule.register(), ClientsModule.registerAsync({ clients: [ { name: AMQP_EXCHANGE, useClass: ClientRmqExchangeModuleOptionsFactory, extraProviders: [ AmqpVaultService, Logger ] } ], isGlobal: true }) ], }) export class AppModule { } ```