Last active
July 7, 2020 18:32
-
-
Save mrsid96/5a58b47a7bd31b0290e8836207790112 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let workOnChannel = async (channel) => { | |
//The channel here is a regular amqplib `ConfirmChannel`. | |
let exchange = "myFavExchangeName"; | |
await channel.assertExchange(exchange, 'fanout', { | |
durable: false | |
}); | |
let { queue } = await channel.assertQueue('', { | |
exclusive: true, | |
autoDelete: true | |
}); | |
console.log("[*] Waiting for messages in %s. To exit press CTRL+C", queue); | |
channel.bindQueue(queue, exchange, ''); | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment