Open marcopogo81 opened 7 years ago
Affects me too, very annoying
Any thoughts for fixing this or working around it? How can I validate a connection or set some sort of timeout on trying to validate the connection with completeConfiguration?
I am also experiencing this, if the connection string is wrong there is no error thrown.
const connection = new Amqp.Connection(process.env.AMQP_HOST);
const queue = connection.declareQueue(myQueue, { durable: true });
if (queue) {
logger.debug(`Connected to MQ queue ${myQueue}`);
const msg = new Amqp.Message(queryStr);
queue.send(msg);
} else {
logger.error(new Error(`Unable to connect to queue ${myQueue}`));
}
connection.completeConfiguration() doesn't reject the Promise if the connection string passed is wrong.