Hi community,
I’m preparing to migrate data from a source MongoDB (4.4) to a target database in production. I’m currently testing this setup in a lab environment. The migration strategy involves:
I’m trying to use Debezium (v2.5) MongoDB connector to perform on-demand incremental snapshots via Kafka signals. The connector receives the signal and creates a document in the cdc.signal collection, but no snapshot is triggered - no Kafka topics are created for the snapshot data and no data is exported.
CDC works fine for new records (I tested by inserting new records), but the incremental snapshot signal doesn’t work.
SetupConnector Configuration:
{ "name": "debezium-mongodb-source-connector-3", "config": { "connector.class": "io.debezium.connector.mongodb.MongoDbConnector", "tasks.max": "1", "mongodb.connection.string": "mongodb://mongodb-source:27017/?replicaSet=rs0", "topic.prefix": "mongo-source-v2", "database.include.list": "sample_mflix", "snapshot.mode": "never", "incremental.snapshot.watermarking.strategy": "insert_insert", "incremental.snapshot.chunk.size": "8192", "incremental.snapshot.allow.schema.changes": "true", "key.converter": "org.apache.kafka.connect.json.JsonConverter", "key.converter.schemas.enable": "true", "value.converter": "org.apache.kafka.connect.json.JsonConverter", "value.converter.schemas.enable": "true", "producer.override.max.request.size": "52428800", "signal.enabled.channels": "kafka", "signal.kafka.topic": "debezium_signals.debezium-mongodb-source-connector-2", "signal.kafka.bootstrap.servers": "kafka:29092", "signal.data.collection": "cdc.signal" } }Signal Message Sent to Kafka:
{ "type": "execute-snapshot", "data": { "data-collections": [ "sample_mflix.comments", "sample_mflix.movies", "sample_mflix.sessions", "sample_mflix.theaters", "sample_mflix.users" ], "type": "incremental" } }Document Created in MongoDB cdc.signal Collection:
{ "_id": "d30dae13-a99b-493e-87bc-d9a73826535b-open", "type": "snapshot-window-open", "payload": "" } What HappensAny help would be greatly appreciated! I’m also open to any best practice recommendations for migrating data in production using this approach.
--
You received this message because you are subscribed to the Google Groups "debezium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to debezium+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/debezium/405c2428-e734-4cae-a107-2de92f12d8ben%40googlegroups.com.