vertx / io.vertx.rxjava.servicediscovery.types / MongoDataSource / getMongoClient

# getMongoClient

`open static fun getMongoClient(discovery: ServiceDiscovery, filter: JsonObject, resultHandler: Handler<AsyncResult<MongoClient>>): Unit`

Convenient method that looks for a Mongo datasource source and provides the configured io.vertx.rxjava.ext.mongo.MongoClient. The async result is marked as failed is there are no matching services, or if the lookup fails.

### Parameters

`discovery` - The service discovery instance

`filter` - The filter, optional

`resultHandler` - The result handler

`open static fun getMongoClient(discovery: ServiceDiscovery, filter: Function<Record, Boolean>, resultHandler: Handler<AsyncResult<MongoClient>>): Unit`

Convenient method that looks for a Mongo datasource source and provides the configured io.vertx.rxjava.ext.mongo.MongoClient. The async result is marked as failed is there are no matching services, or if the lookup fails.

### Parameters

`discovery` - The service discovery instance

`filter` - The filter

`resultHandler` - The result handler

`open static fun getMongoClient(discovery: ServiceDiscovery, filter: JsonObject, consumerConfiguration: JsonObject, resultHandler: Handler<AsyncResult<MongoClient>>): Unit`

Convenient method that looks for a Mongo datasource source and provides the configured io.vertx.rxjava.ext.mongo.MongoClient. The async result is marked as failed is there are no matching services, or if the lookup fails.

### Parameters

`discovery` - The service discovery instance

`filter` - The filter, optional

`consumerConfiguration` - the consumer configuration

`resultHandler` - the result handler