Is there a way in the MongoDB Kafka Sink Connector to create a MongoDB collection for per Kafka topic by defining a pattern or prefix or other way?
1 Answer
@OneCricketeer already pointed out in the comments that the sink connector creates topics already. If you don't specify a value for collection in the configuration, the default setting is the topic name. To match every topic that your producers write to, you can use "topics.regex": ".*". It's easy to overlook in the mongodb docs