@rxap/nest-rabbitmq
@rxap/nest-rabbitmq
**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-vault@^10.1.1-dev.0 @rxap/utilities@^16.4.0-dev.1 amqp-connection-manager@^4.1.14 amqplib@^0.10.4 rxjs@^7.8.1
Execute the init generator: bash yarn nx g @rxap/nest-rabbitmq:init
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 { }
##
init
>
Initialize the package in the workspace
```bash yarn nx g
@rxap/nest-rabbitmq:init
```