Is it possible to enable spring.cloud.stream.kafka.streams.binder.auto-create-topics
in the application.yml only for topics that the application produces and not auto-create topics that the application consumes? I'd like for my producers to only be responsible for creating topics. I'm using spring-cloud-streams with the kafka-streams binder.
In a more general sense, is this the right approach to creating kafka topics?
It is a binder, not a binding, property so, no.
You can, however, use the multi-binder support and define 2 kafka binders with that property set as needed, one for producer and the other for consumer bindings.
I suggest you open a new feature suggestion in a GitHub issue against the binder, allowing the binder property to be overridden at the binding level.
https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues