Trying something similar with a source connector that feeds into Azure Event Hubs. Below is my configuration in a strimzi yaml. I’ve been testing with just one collection but no success.
config:
connection.uri: <>
offsets.storage.topic: “offsets.hub”
database: “”
startup.mode: “latest”
server.api.version: “4.2”
publish.full.document.only: “true”
heartbeat.interval.ms: “5000”
errors.log.enable: “true”
errors.log.include.messages: “true”
mongo.errors.log.enable: “true”
output.schema.infer.value: “true”
pipeline: “[{"$match":{"operationType":{"$in":["insert","update","replace"]}}}, { "ns.coll": { "$in": [""]}}, {"$project":{"_id":1,"fullDocument.id":1,"ns":1,"documentKey":1}}]”
This is the error I receive in KafkaConnect logs [private info redacted]:
2025-07-16 INFO [<connector_name>|task-0] Watching for database changes on ‘<db_name>’ (com.mongodb.kafka.connect.source.MongoSourceTask) [task-thread-<connector_name>-0]
2025-07-16 INFO [<connector_name>|task-0] New change stream cursor created without offset. (com.mongodb.kafka.connect.source.MongoSourceTask) [task-thread-<connector_name>-0]
2025-07-16 INFO [<connector_name>|task-0] Opened connection [connectionId{localValue:<###>, serverValue:<###>}] to <mongo_db_connection> (org.mongodb.driver.connection) [task-thread-<connector_name>-0]
2025-07-16 WARN [<connector_name>|task-0] Failed to resume change stream: Expected type string but found int. 2
Thanks