Grant the Debezium user the read role on all databases to watch, plus the clusterMonitor role to read replica set status, using db.grantRolesToUser() in the admin database
Set connector.class=io.debezium.connector.mongodb.MongoDbConnector and mongodb.connection.string to the replica set URI including rs0 seed list
Set capture.mode=change_streams_update_full_with_pre_image (MongoDB 6+) to include both before and after document states in update events; fall back to change_streams_update_full for earlier versions
Configure snapshot.mode=initial to perform an initial snapshot before streaming, or snapshot.mode=never to begin streaming from the current change stream position
Monitor the resume token stored in the offsets topic; if it falls outside the oplog window (deleted during oplog rotation), reset the connector with snapshot.mode=initial
Known gotchas
Pre-image support requires the collection to be created with changeStreamPreAndPostImages: { enabled: true }; this cannot be set retroactively on an existing collection without recreation
Debezium MongoDB connector does not support multi-document transactions before version 1.9; update events for documents modified inside a transaction may arrive out of order relative to the transaction commit order
If the MongoDB replica set primary fails over while Debezium holds a change stream cursor, the connector must reconnect and resume from the last stored resume token; ensure the resume token is flushed to Kafka offsets before the failover window closes
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp