-
Enhancement
-
Resolution: Done
-
Optional
-
None
-
False
-
False
-
While trying out DBZ mongo connector today against Atlas, I realized that the current way to configure the connector regarding DB connection settings is less convenient than it could be. Users have to explicitly specify multiple separate config options, e.g.
- mongodb.hosts
- mongodb.user
- mongodb.password
and others such as SSL settings. IMHO the easier/"better" way to specify the DB connection settings is to use the connection string URI format which is documented here https://docs.mongodb.com/manual/reference/connection-string/
There are two formats, standard and DNS seed list. When working with MongoDB Atlas you can directly C&P this from the web UI and it would be nice if the connector supports this as is. For instance, this would be one simple example of such a connection string URI from Atlas:
mongodb+srv://<user>:<password>@<cluster-subdomain>.azure.mongodb.net/myDB?retryWrites=true&w=majority
or here in combination with the Java Driver
ConnectionString connectionString = new ConnectionString("mongodb+srv://<user>:<password>@<cluster-subdomain>.azure.mongodb.net/myDB?retryWrites=true&w=majority");
MongoClientSettings settings = MongoClientSettings.builder()
.applyConnectionString(connectionString)
.build();
MongoClient mongoClient = MongoClients.create(settings);
- is duplicated by
-
MGDCTRS-876 debezium: support mongodb atlas connection string
- Closed
- is related to
-
DBZ-4802 "DebeziumException: Unable to find primary from MongoDB connection" post upgrade to 1.8.1
- Closed