Kafka-ZooKeeper integration¶
Apache Kafka relies on [[Apache ZooKeeper]] as a distributed coordination service for managing the cluster's metadata and state.^[600-developer-big-data-kafka-kafka-01.md]
Connection Configuration¶
The integration is configured via the zookeeper.connect property in the server.properties file.^[600-developer-big-data-kafka-kafka-01.md] This value is defined as a comma-separated list of host:port pairs, corresponding to the servers in the ZooKeeper ensemble^[600-developer-big-data-kafka-kafka-01.md].
An optional chroot string can be appended to the URLs to specify the root directory for all Kafka znodes^[600-developer-big-data-kafka-kafka-01.md].
Consumer CLI Usage¶
In Kafka console utilities, the ZooKeeper connection string is explicitly required when creating a consumer^[600-developer-big-data-kafka-kafka-01.md].
For example, the kafka-console-consumer.sh script uses the --zookeeper flag followed by the connection string (e.g., hadoop101:2181) to identify the cluster metadata^[600-developer-big-data-kafka-kafka-01.md].
Sources¶
Related¶
- Apache Kafka
- [[Apache ZooKeeper]]
- [[Broker configuration]]