Kafka Listeners – Explained | Confluent
Jul 1, 2019Robin Moffatt

Summary
This post explains the critical difference between Kafka listeners and advertised listeners, emphasizing that advertised listeners must be set to the external address clients can reach. It details how clients obtain broker metadata and then attempt to connect using the advertised addresses. The post illustrates common misconfigurations with Docker and AWS examples, showing how incorrect advertised listeners lead to 'Host resolution failure' errors. It also provides a clear explanation of the configuration parameters (KAFKA_LISTENERS, KAFKA_ADVERTISED_LISTENERS, etc.) and demonstrates how to verify listener configurations using kafkacat.
More from the Kafka Client Connectivity Troubleshooting trail
- Diagnose and Debug Apache Kafka Issues: Understanding Increased Connections
- Diagnose and Debug Apache Kafka Issues: Understanding Increased Consumer Rebalance Time
- Diagnose and Debug Apache Kafka Issues: Understanding Increased Request Rate, Response Time, and/or Broker Load
- Reduced Message Throughput | Diagnose and Debug Kafka Issues Series
- 5 Common Pitfalls When Using Apache Kafka