How to set Auto Reconnect with Unified Topology : <p>After setting <code>useUnifiedTopology=true</code>, the Auto Reconnect stopped working and generates the following ERRORS:</p>

<pre><code>DeprecationWarning: The option `reconnectInterval` is incompatible with the unified topology
DeprecationWarning: The option `reconnectTries` is incompatible with the unified topology
DeprecationWarning: The option `autoReconnect` is incompatible with the unified topology
</code></pre>

<p>How can i get the server to auto-reconnect with that new flag?</p>

<p>I'm using <code>mongoose.createConnection</code> to connect with the following options:</p>

<pre><code>{
        autoReconnect: true,
        keepAliveInitialDelay: 300000,
        connectTimeoutMS: 300000,
        reconnectTries: Number.MAX_VALUE,
        reconnectInterval: 1000,
        useNewUrlParser: true,
        useUnifiedTopology: true,
        useCreateIndex: true,
        poolSize: 10,
        auth: {
            authSource: "admin"
        },
        user: process.env.MONGO_USER,
        pass: process.env.MONGO_PASS
    }
</code></pre>
