# Module: vertx-mongo-js/mongo_client

## vertx-mongo-js/mongo_client

Source:
  - mongo_client.js, line 3

### Classes

MongoClient

### Methods

#### <static> MongoClient.createNonShared(vertx, config) → {MongoClient}

  Create a Mongo client which maintains its own data source.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `vertx` | Vertx | the Vert.x instance
  `config` | Object | the configuration

  Source:
    - mongo_client.js, line 532

  ##### Returns:

  the client
  Type
    MongoClient

#### <static> MongoClient.createShared(vertx, config, dataSourceName) → {MongoClient}

  Create a Mongo client which shares its data source with any other Mongo clients created with the same data source name

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `vertx` | Vertx | the Vert.x instance
  `config` | Object | the configuration
  `dataSourceName` | string | the data source name

  Source:
    - mongo_client.js, line 549

  ##### Returns:

  the client
  Type
    MongoClient