src/lib/options.ts
Properties |
|
| consumerTag |
consumerTag:
|
Type : string
|
| Optional |
| deserializer |
deserializer:
|
Type : Deserializer
|
| Optional |
| headers |
headers:
|
Type : Record<string | string>
|
| Optional |
| isGlobalPrefetchCount |
isGlobalPrefetchCount:
|
Type : boolean
|
| Optional |
| maxConnectionAttempts |
maxConnectionAttempts:
|
Default value : -1
|
Type : number
|
| Optional |
|
Maximum number of connection attempts. Applies only to the consumer configuration. -1 === infinite |
| noAck |
noAck:
|
Type : boolean
|
| Optional |
| noAssert |
noAssert:
|
Type : boolean
|
| Optional |
| persistent |
persistent:
|
Type : boolean
|
| Optional |
| prefetchCount |
prefetchCount:
|
Type : number
|
| Optional |
| replyQueue |
replyQueue:
|
Type : string
|
| Optional |
| serializer |
serializer:
|
Type : Serializer
|
| Optional |
| socketOptions |
socketOptions:
|
Type : AmqpConnectionManagerOptions
|
| Optional |
| urls |
urls:
|
Type : string[] | RmqUrl[]
|
| Optional |
import { RmqUrl } from '@nestjs/microservices/external/rmq-url.interface';
import { Deserializer } from '@nestjs/microservices/interfaces/deserializer.interface';
import { Serializer } from '@nestjs/microservices/interfaces/serializer.interface';
import { AmqpConnectionManagerOptions } from 'amqp-connection-manager/dist/types/AmqpConnectionManager';
import { Options } from 'amqplib';
export interface BaseRmqOptions {
urls?: string[] | RmqUrl[];
prefetchCount?: number;
isGlobalPrefetchCount?: boolean;
socketOptions?: AmqpConnectionManagerOptions;
noAck?: boolean;
consumerTag?: string;
serializer?: Serializer;
deserializer?: Deserializer;
replyQueue?: string;
persistent?: boolean;
headers?: Record<string, string>;
noAssert?: boolean;
/**
* Maximum number of connection attempts.
* Applies only to the consumer configuration.
* -1 === infinite
* @default -1
*/
maxConnectionAttempts?: number;
}
export interface QueueRmqOptions extends BaseRmqOptions {
queue?: string;
queueOptions?: Options.AssertQueue;
}
export interface ExchangeOptions {
name: string;
type: string;
options?: Options.AssertExchange;
}
export interface ExchangeRmqOptions extends BaseRmqOptions {
exchange: ExchangeOptions;
}
export interface ServerRmqOptions extends QueueRmqOptions {
exchange?: ExchangeOptions | ExchangeOptions[];
}