hello.
I’m trying to configure a CDC using the Kafka connector.
But I’m getting an error.
I would like to get some help. Thanks in advance.

(Error message)
com.mongodb.MongoBulkWriteException: A bulk write operation error occurred on server aa.com:27017. The write error was: [BulkWriteError{index=0, code=61, message=‘Failed to target upsert with query :: Unable to extract exact shard key’, details={}}]

(source connector)
tasks.max=1
connector.class=com.mongodb.kafka.connect.MongoSourceConnector
connection.uri=mongodb://x.x.x.x:27017/?authSource=admin
database=testdb
collection=test_shard_collection
poll.await.time.ms=1000
mongo.errors.tolerance=all
startup.mode=copy_existing
topic.prefix=topic.testdb
topic.separator=.

(Sink connector)
connector.class=com.mongodb.kafka.connect.MongoSinkConnector
mongo.errors.tolerance=all
errors.log.include.messages=true
database=testdb
mongo.errors.log.enable=true
topics=topic.testdb.testdb.testdb.test_shard_collection
tasks.max=1
connection.uri=mongodb://x.x.x.x:27017/?ssl=true&retryWrites=false
collection=test_shard_collection
change.data.capture.handler=com.mongodb.kafka.connect.sink.cdc.mongodb.ChangeStreamHandler

thank you.