Class MongoServiceBindingConverter

java.lang.Object
io.quarkus.mongodb.runtime.MongoServiceBindingConverter
All Implemented Interfaces:
ServiceBindingConverter

public class MongoServiceBindingConverter extends Object implements ServiceBindingConverter
ServiceBindingConverter for MongoDB to support SBO (Service Binding Operator) in Quarkus. This class supports both the Standard and SRV connection string format for MongoDB depending on whether srv property is true or false. If the srv property is missing then it is same as having a value of false.

Following individual properties are supported to make the connection string:
  • username
  • password
  • host (port information can be provided in this property separated by : sign, e.g. localhost:27010
  • database
  • srv
  • options
Other than host all other properties are optional

The Quarkus properties set by this class are:
  • quarkus.mongodb.connection-string
  • quarkus.mongodb.credentials.username (if username is provided)
  • quarkus.mongodb.credentials.password (if password is provided)