Can a Kafka producer create topics and partitions?

前端 未结 4 2533
一向
一向 2021-02-20 00:55

currently I am evaluating different Messaging Systems. There is a question related to Apache Kafka which I could not answer myself.

Is it possible for a Kafka producer t

4条回答
  •  佛祖请我去吃肉
    2021-02-20 01:56

    Updated:

    The kafka broker has a property: auto.create.topics.enable

    If you set that to true if the producer publishes a message to the topic with the new topic name it will automatically create a topic for you.

    The Confluent Team recommends not doing this because the explosion of topics, depending on your environment can become unwieldy, and the topic creation will always have the same defaults when created. It's important to have a replication-factor of at least 3 to ensure durability of your topics in the event of disk failure.

提交回复
热议问题