mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
fix: rabbitmq bindings and auto-generated queues
This commit is contained in:
@@ -192,6 +192,15 @@ export class ClientRMQ extends ClientProxy {
|
||||
if (!this.noAssert) {
|
||||
await channel.assertQueue(this.queue, this.queueOptions);
|
||||
}
|
||||
|
||||
if (this.options.exchange && this.options.routingKey) {
|
||||
await channel.bindQueue(
|
||||
this.queue,
|
||||
this.options.exchange,
|
||||
this.options.routingKey,
|
||||
);
|
||||
}
|
||||
|
||||
await channel.prefetch(prefetchCount, isGlobalPrefetchCount);
|
||||
await this.consumeChannel(channel);
|
||||
resolve();
|
||||
|
||||
Reference in New Issue
Block a user