logstash-plugins / logstash-integration-kafka

Kafka Integration for Logstash, providing Input and Output Plugins
Apache License 2.0
32 stars 60 forks source link

Support "allow.auto.create.topics" to disable auto creation of topics #171

Closed jsvd closed 5 months ago

jsvd commented 5 months ago

From https://cwiki.apache.org/confluence/display/KAFKA/KIP-361%3A+Add+Consumer+Configuration+to+Disable+Auto+Topic+Creation:

When consumer subscribes to a non-existent topic, it does not have control over whether the topic is automatically created or not. We have the broker configuration allow.auto.create.topics that controls topic auto-creation globally. If there is a lag between the consumers and producers starting up, we usually do not want the consumer to be able to automatically create the topic as this will use the default number of partitions and replication factor. Consumers should thus have the ability to be able to disable auto topic creation, if needed.

Configuration Name: allow.auto.create.topics

Type: BOOLEAN Explanation: This configuration controls whether the topic is automatically created when subscribing to a non-existent topic. A topic will be auto-created only if this configuration is set to true and auto-topic creation is enabled on the broker using auto.create.topics.enable; otherwise auto-topic creation is not permitted. This configuration must be set to true when using brokers older than 0.11.

jsvd commented 5 months ago

fixed by #172