File

src/lib/options.ts

Index

Properties

Properties

consumerTag
consumerTag: string
Type : string
Optional
deserializer
deserializer: Deserializer
Type : Deserializer
Optional
headers
headers: Record<string | string>
Type : Record<string | string>
Optional
isGlobalPrefetchCount
isGlobalPrefetchCount: boolean
Type : boolean
Optional
maxConnectionAttempts
maxConnectionAttempts: number
Default value : -1
Type : number
Optional

Maximum number of connection attempts. Applies only to the consumer configuration. -1 === infinite

noAck
noAck: boolean
Type : boolean
Optional
noAssert
noAssert: boolean
Type : boolean
Optional
persistent
persistent: boolean
Type : boolean
Optional
prefetchCount
prefetchCount: number
Type : number
Optional
replyQueue
replyQueue: string
Type : string
Optional
serializer
serializer: Serializer
Type : Serializer
Optional
socketOptions
socketOptions: AmqpConnectionManagerOptions
Type : AmqpConnectionManagerOptions
Optional
urls
urls: string[] | RmqUrl[]
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[];
}

results matching ""

    No results matching ""