Search code examples
apache-kafkaspring-cloud-streamspring-cloud-stream-binder-kafka

How can I configure a Spring Cloud Stream (Kafka) application to autocreate the topics in Confluent Cloud?


Is there a way to allow (Spring Cloud Stream) applications autocreate the topics they need in Confluent Cloud?

So far I've had to manually create them which is error prone when you consider you also have to setup changelog topics.


Solution

  • The binder property autoCreateTopics is true by default. So topics should be created automatically, (unless the broker permissions don't allow it - but I would expect to see errors in the logs in that case).

    There is another property autoAddPartitions which is false by default.