hpgrahsl / kafka-connect-mongodb

**Unofficial / Community** Kafka Connect MongoDB Sink Connector -> integrated 2019 into the official MongoDB Kafka Connector here: https://www.mongodb.com/kafka-connector
Apache License 2.0
153 stars 60 forks source link

id startegy #97

Closed sourjya123 closed 5 years ago

sourjya123 commented 5 years ago

Hi I have used kafkametadatastrategy for storing kafka key to mongo. But it stores topic+partitionId+offset.

Can we store the topic only instead of all this information?

hpgrahsl commented 5 years ago

Hi @sourjya123! Short answer NO. Somewhat longer answer: you are referring to the ID strategy and thus the triplet is needed to ensure uniqueness based on Kafka coordinates. Topic alone wouldn't make much sense since you would only be able to insert 1 document into the collection per kafka topic.