Gatsby_Lee
(Gatsby Lee)
October 24, 2021, 7:33am
#1
Hi,
Can you share your knowledge in the difference between “publish.full.document.only” and “change.stream.full.document”?
I am having a difficult time to understand these two options?
I am not sure why I have to specify “publish.full.document.only=true” although I use “change.stream.full.document=updateLookup”
# MongoDB Kafka Connector
## The MongoDB Kafka source connector guide
An [Apache Kafka](https://kafka.apache.org/) [connect source connector](https://kafka.apache.org/documentation/#connect) for
[MongoDB](https://www.mongodb.com/).
For more information about configuring connectors in general see the
[official Confluent documentation](https://docs.confluent.io/current/connect/managing/configuring.html).
### MongoDB Source
Kafka records are generated from [change stream event documents](https://docs.mongodb.com/manual/changeStreams/). Change streams can observe
changes at the _collection_, _database_ or _client_ level.
Data is read from MongoDB using the configuration connection as specified in the
[connection string](http://mongodb.github.io/mongo-java-driver/3.10/javadoc/com/mongodb/ConnectionString.html).
**Note:** Change streams require a replicaSet or a sharded cluster using replicaSets.
This file has been truncated. show original
Thank you for your help in advance
Gatsby_Lee
(Gatsby Lee)
October 24, 2021, 7:44am
#2
nvm. after testing, I got the difference.
For one who has the same question I have, let me put the output.
change.stream.full.document=true
{
“_id”: {
“$oid”: “61750cb68270b7e6ec5ba733”
},
“name”: “korea”,
“city”: “seoul”
}
change.stream.full.document=false
{
"_id": {
"_data": "8261750CB6000000012B022C0100296E5A1004CA338B7809FF4C5598E8F3FDCCD0411C46645F6964006461750CB68270B7E6EC5BA7330004"
},
"operationType": "insert",
"clusterTime": {
"$timestamp": {
"t": 1635060918,
"i": 1
}
},
"fullDocument": {
"_id": {
"$oid": "61750cb68270b7e6ec5ba733"
},
"name": "mlee",
"city": "seoul"
},
"ns": {
"db": "mlee-test",
"coll": "dummy"
},
"documentKey": {
"_id": {
"$oid": "61750cb68270b7e6ec5ba733"
}
}
}
system
(system)
Closed
October 29, 2021, 7:53am
#3
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.