I'm using the amqplib library for nodejs to work with RabbitMQ. I'm trying to check whether a queue exists by using the function checkQueue
:
mychannel.checkQueue('xxx', function (err, ok) {
console.log(err);
console.log(ok)
});
But it not only throws an error, but also closes the channel. How can I safely check if the queue exists?