I m trying to understand how listener configuration work in Kafka. I installed Apache Kafka on my local machine, and I have this configuration initially and commented out advertised listeners part:
listeners = PLAINTEXT://localhost:9092
and when I run Kafka cli to list topics, It works fine. However, when I add advertised listeners something like below, the cli's to describe/list doesn't work with the localhost
listeners = PLAINTEXT://localhost:9092
advertised.listeners=PLAINTEXT://hostname.local:9092
listener.security.protocol.map=PLAINTEXT:PLAINTEXT,INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
and here is how I m trying to list the topics:
bin/kafka-topics.sh --list --bootstrap-server localhost:9092