mongosh “mongodb+srv://databaseAdmin:databaseAdminPassword@my-cluster-name-rs0..svc.cluster.local/admin?replicaSet=rs0&ssl=false”
Does this have ability to detect failover and route the applications to new Primary ?
It was sending my connection to Secondary.
rs0 [direct: secondary] admin> db.currentOp()
MongoServerError: not primary and secondaryOk=false - consider using db.getMongo().setReadPref() or readPreference in the connection string
rs0 [direct: secondary] admin>