Skip to content

Commit fcc99fe

Browse files
fix: fix-prefetch-count
1 parent 8c7ad3d commit fcc99fe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/consumer/rabbitmq-messaging.consumer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ export class RabbitmqMessagingConsumer
2727
await this.rabbitMqMigrator.run(channel);
2828

2929
const amqpChannel = channel.channel;
30+
3031
if (!amqpChannel) {
3132
throw new Error('AMQP channel not initialized');
3233
}
3334

35+
await amqpChannel.prefetch(1);
3436
await amqpChannel.consume(
3537
channel.config.queue,
3638
async (msg) => {

0 commit comments

Comments
 (0)