Comment on page
MongoDB
In this section, we will go over how to gather your credentials and prepare your MongoDB server to start providing CDC logs.
We will be running Debezium to fetch CDC logs from MongoDB by using Change Streams which is a more performant and reliable approach than tailing the
oplog
. MongoDB server must be in a replica set. If your deployment only has a
standalone
server, you can create a replica set with one member. This is necessary so that we are able to run a Debezium deployment to subscribe to Change Events within your MongoDB cluster. To see additional configuration properties, please click here to see Debezium's documentation.
Name | Description | Default value |
---|---|---|
Connection string | No default. | |
Username | Username for authentication into your database. | No default |
Password | Password for authentication into your database. | No default |
Authentication source | admin |
use admin;
# Creating a role to allow listing DBs and finding the changeStream
db.runCommand({
createRole: "listDatabases",
privileges: [
{ resource: { cluster : true }, actions: ["listDatabases"]}
],
roles: []
});
db.runCommand({
createRole: "readChangeStream",
privileges: [
{ resource: { db: "", collection: ""}, actions: [ "find", "changeStream" ] },
],
roles: []
});
# Creating a service account, assign permissions
db.createUser({
user: 'artie',
pwd: 'artie',
roles: [
{ role: "read", db: <COLLECTION_NAME> },
{ role: "read", db: "local" },
{ role: "listDatabases", db: "admin" },
{ role: "readChangeStream", db: "admin" },
{ role: "read", db: "config" },
{ role: "read", db: "admin" }
]
});
- Array
- Binary
- Array
- Boolean
- ObjectID
- Int32
- Int64
- Double
- Decimal128
- Code
- CodeWScope
- RegEx
- Datetime
- Timestamp
- String
These considerations are automatically handled for you if Artie Transfer is running a Debezium connector for you.
We are also actively working on reducing the amount of considerations required to support every possible configuration.
value.converter
must be set toorg.apache.kafka.connect.json.JsonConverter
value.converter.schemas.enable
must be set totrue
Last modified 25d ago