I am upgrading my mongodb c++ client code from legacy driver and 26compat driver to r3.0.2 driver. The scopedconnection pool class is removed now. My question is how to connect to replica set with connection pool. My current code is:
//only call it once in my app
//call it in anywhere I need
You'll want to use the mongocxx::pool class. The URI looks fine – as long as you have the
replicaSet option, the driver understands to connect in replica set mode.