@rxap/nest-amqp
Version:
@rxap/nest-amqp
50 lines (43 loc) • 1.78 kB
Markdown
#
@rxap/nest-amqp
[](https://www.npmjs.com/package/@rxap/nest-amqp)
[](https://commitizen.github.io/cz-cli/)
[](https://github.com/prettier/prettier)


 -
[Installation](#installation)
- [Guides](#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 { }
```