Skip to content

Class: RabbitMQModule

Defined in: packages/rabbitmq/src/rabbitmq.module.ts:125

Constructors

Constructor

ts
new RabbitMQModule(): RabbitMQModule;

Returns

RabbitMQModule

Methods

AmqpConnectionFactory()

ts
static AmqpConnectionFactory(config): Promise<AmqpConnection | undefined>;

Defined in: packages/rabbitmq/src/rabbitmq.module.ts:165

Parameters

ParameterType
configRabbitMQConfig

Returns

Promise<AmqpConnection | undefined>


attach()

ts
static attach(connection): DynamicModule;

Defined in: packages/rabbitmq/src/rabbitmq.module.ts:277

Parameters

ParameterType
connectionAmqpConnection

Returns

DynamicModule


forFeature()

ts
static forFeature(handlers): DynamicModule;

Defined in: packages/rabbitmq/src/rabbitmq.module.ts:269

Parameters

ParameterType
handlersunknown[]

Returns

DynamicModule


forRoot()

ts
static forRoot(options): DynamicModule;

Defined in: packages/rabbitmq/src/rabbitmq.module.ts:187

Parameters

ParameterType
optionsRabbitMQModuleOptions

Returns

DynamicModule


forRootAsync()

ts
static forRootAsync(options): DynamicModule;

Defined in: packages/rabbitmq/src/rabbitmq.module.ts:222

Parameters

ParameterType
options{ inject?: ( | ProviderToken | { optional?: boolean; token: ProviderToken; })[]; isGlobal?: boolean; useFactory: (...args) => | RabbitMQModuleOptions | Promise<RabbitMQModuleOptions>; }
options.inject?( | ProviderToken | { optional?: boolean; token: ProviderToken; })[]
options.isGlobal?boolean
options.useFactory(...args) => | RabbitMQModuleOptions | Promise<RabbitMQModuleOptions>

Returns

DynamicModule


markConnectionBootstrapped()

ts
static markConnectionBootstrapped(name): boolean;

Defined in: packages/rabbitmq/src/rabbitmq.module.ts:148

Internal

Marks a connection as bootstrapped. Returns true when it was already bootstrapped (the caller should skip re-registration) and false on the first call for that connection name.

Parameters

ParameterType
namestring

Returns

boolean


resetBootstrapGuard()

ts
static resetBootstrapGuard(): void;

Defined in: packages/rabbitmq/src/rabbitmq.module.ts:161

Internal

Clears the per-connection bootstrap guard. Called on shutdown so a subsequent boot (e.g. across test suites) re-registers handlers.

Returns

void

Properties

PropertyModifierTypeDescriptionDefined in
connectionManagerreadonlyAmqpConnectionManagerShared manager that owns every named connection created through this module. Kept static so that multiple forRoot/forRootAsync registrations (one per named connection) share a single registry, and so the shutdown hook can close them all.packages/rabbitmq/src/rabbitmq.module.ts:132

Released under the MIT License.