0

We recently switched to Reactive Kafka. It seems kafka does not throw any error if the topic exists while creating stream for the topic. Why is it so?

I know that existence of a topic can explicitly be checked with AdminUtils.topicExists(zkClient, topicName). Is there a way to force reactive kafka to check if topic exists on its own before creating streams?

user87407
  • 647
  • 3
  • 7
  • 24

1 Answers1

0

This can be configured in the Kafka Broker settings. The related config is auto.create.topics.enable and it's true by default. Setting it to false should cause the underlying Apache Kafka client to throw an error if a topic does not exist, instead of automatically creating a new topic.

See the docs for more info.

Stefano Bonetti
  • 8,973
  • 1
  • 25
  • 44