Should I keep the connection open always or is it better to connect and disconnect only when a message is added to the queue?
If i keep the connection open at all times, the connection disconnects after about 1 hour.
I connect as follows:
const connection = await amqp.connect(`${this._options.url}?heartbeat=30`, { timeout: 30000, keepAlive: true });
How to make the connection reconnect automatically?