change prefetch settings
This commit is contained in:
parent
11c7e44267
commit
e43ab395e6
1
index.ts
1
index.ts
@ -11,6 +11,7 @@ const rabbitUrl = process.env.RABBITMQ_URL || "amqp://localhost";
|
||||
async function start() {
|
||||
const conn = await amqp.connect(rabbitUrl);
|
||||
const channel = await conn.createChannel();
|
||||
await channel.prefetch(1);
|
||||
await channel.assertQueue(queueName);
|
||||
|
||||
console.log(`🎧 Listening for messages on "${queueName}"...`);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user