Reputation: 97
If the RabbitMQ instance if found error then it takes about 120 seconds to timeout before trying to the error
Here is my code used for connecting:
async function connectAmqp() {
try {
// Create amqp connection and is there any error then exit with error.
cluster = await amqp.connect(`amqp://127.0.0.1:5672`,{
timeout:2000
});
return cluster;
} catch (error) {
throw error;
}
}
Upvotes: 1
Views: 786