Reactive Scala Driver for MongoDB

Asynchronous & Non-Blocking

Azure Cosmos DB

Cosmos DB is the database service available in Microsoft Azure, with some compatibility with MongoDB.

Once registered, the MongoDB credentials are shown.

Cosmos DB credentials

Then ReactiveMongo can be used to connect with the following pattern for the connection URI, with variables replaced appropriately (e.g. ${AZURE_USERNAME} by actual username).

mongodb.uri = "mongodb://${AZURE_USERNAME}:${AZURE_PASSWORD}@${HOST}:${PORT}/${AZURE_USERNAME}?ssl=true"

Note the ssl=true parameter is required.

For example, if bd8f94d5-3661-4876-8eaa-d7d98c810587 is the username and password NkMxQjAzQzMtREIyQy00MTg4LUE3NjYtNkY3MkU1NjNDRkRECg==, then when port 10250 the connection URI would be as bellow.

mongodb.uri = "mongodb://"

See the documentation