apache-kafka

what is bootstrap-server in kafka config?


I have just started learning kafka and continuously I am coming across a term bootstrap-server.

Which server does it represent in my kafka cluster?


Solution

  • It is the url of one of the Kafka brokers which you give to fetch the initial metadata about your Kafka cluster. The metadata consists of the topics, their partitions, the leader brokers for those partitions etc. Depending upon this metadata your producer or consumer produces or consumes the data.

    You can have multiple bootstrap-servers in your producer or consumer configuration. So that if one of the broker is not accessible, then it falls back to other.