Reputation: 1234
I've two applications :
I've configured
spring.cloud.stream.kafka.binder.brokers
and spring.cloud.stream.kafka.binder.defaultBrokerPort
.
Everything works well.
In the documentation I see
spring.cloud.stream.kafka.binder.zkNodes
and spring.cloud.stream.kafka.binder.defaultZkPort
to define a list of ZooKeeper nodes to which the Kafka binder can connect.
In my understanding, i just have to connect my application to kafka. So could you explain me when it's usable, or could you give me a use case where i have to define the zookeeper relative properties.
Upvotes: 0
Views: 958
Reputation: 2400
Zookeeper is used for allowing the Kafka binder to create topics automatically (using binder options, such as the partition count, or number of concurrent instances - as opposed to relying on the broker to create them). If you don't need the feature, you can disable topic auto-creation. See the discussion here: https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/37.
This is a feature available since 1.1. In 1.0 Zookeeper was needed by the 0.8 SimpleConsumer client.
Upvotes: 3