Can a Kafka producer create topics and partitions?

前端 未结 4 2522
一向
一向 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:41

    When you are starting your kafka broker you can define a bunch of properties in conf/server.properties file. One of the property is auto.create.topics.enable if you set this to true (by default) kafka will automatically create a topic when you send a message to a non existing topic. The partition number will be defined by the default settings in this same file.

    Disadvantages : as far as I know, topics created this way will always have the same default settings (partitions, replicas ...).

提交回复
热议问题