A bootstrap server is a host-and-port endpoint that a Kafka client uses to establish an initial connection to a broker or Kafka cluster. The bootstrap.servers configuration accepts one endpoint during development or several comma-separated endpoints for production deployments. section 4.2.1 section 6.3.2
Configure the same connection concept across Kafka client types:
- Set bootstrap.servers for KafkaProducer with a broker endpoint such as localhost:9092. section 4.2.1
- Set bootstrap.servers for KafkaConsumer; provide either one host:port pair or a comma-separated list. section 4.3
- Set StreamsConfig.BOOTSTRAP_SERVERS_CONFIG alongside application.id; both properties are required to start a Kafka Streams application. section 6.3.2
Kafka Streams connection
A minimal Streams configuration supplies an application identifier and one bootstrap endpoint: props.put(StreamsConfig.APPLICATION_ID_CONFIG, "yelling_app_id"); props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092"); Replace the single development endpoint with comma-separated broker endpoints when connecting to a production cluster. section 6.3.2 section 4.2.1
props.put(StreamsConfig.APPLICATION_ID_CONFIG, "yelling_app_id"); props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
Inspect the minimal Java properties required to identify a Kafka Streams application and establish its Kafka cluster connection. section 6.3.2
