0

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
  • 1
    Isn't a collection created by the sink connector already, if it doesn't exist? Commented Jan 30, 2023 at 18:19

1 Answer 1

0

@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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.