fix: rabbitmq bindings and auto-generated queues

This commit is contained in:
Khan / 이창민
2024-11-11 15:31:19 +09:00
parent bc4667c15a
commit e231f9887e
4 changed files with 24 additions and 1 deletions

View File

@@ -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();