Connection here does not mean that there is one open channel to the server:
behind the scene, many connections (channels) are open on all the available servers in the replica set.
Example:
import scala.concurrent.ExecutionContext
import reactivemongo.api._
def foo(driver: AsyncDriver)(implicit ec: ExecutionContext) = {
val con = driver.connect(List("localhost"))
val db = con.flatMap(_.database("plugin"))
val _ = db.map(_("acoll")) // Collection reference
}
Attributes
mongosystem
the reference to the internal reactivemongo.core.actors.MongoDBSystem Actor.
Returns a DB reference using this connection.
The failover strategy is also used to wait for the node set to be ready,
before returning an valid database reference.
Returns a DB reference using this connection.
The failover strategy is also used to wait for the node set to be ready,
before returning an valid database reference.