title: What does multiple KAFKA_ADVERTISED_LISTENERS mean when we have only one broker, vs when we have many?
body: <p>I am learning Kafka and trying to use it with docker. I'm confused looking at the docker-compose files, so I wanted to ask my questions here.</p>
  <p>In most examples, I see a config like this:</p>
  <pre><code>broker:
     image: confluentinc/cp-enterprise-kafka:5.3.1
     ...
     ports:
         - &quot;29192:29092&quot; 
         - &quot;9192:9092&quot;
     environment:
          ...
          KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092
  </code></pre>
  <p>I wanted to understand a few things related to this:</p>
  <ol>
  <li>Is there a particular convention for using 5-digit (ex: 29092) port <strong>vs</strong> 4-digit (ex: 9092) ports?</li>
  <li>Is there a specific relation between the number of configured brokers to the number of listeners mentioned in <code>KAFKA_ADVERTISED_LISTENERS</code>? <a href="https://github.com/confluentinc/cp-all-in-one/blob/6.0.0-post/cp-all-in-one/docker-compose.yml" rel="nofollow noreferrer">In some places, like confluent's own example</a>, I see only one broker, but multiple <code>KAFKA_ADVERTISED_LISTENERS</code>. What does that mean?</li>
  <li>Also, in the same confluent example mentioned above, there is a listener: <code>PLAINTEXT://broker:29092</code> in <code>KAFKA_ADVERTISED_LISTENERS</code>, but we do not have any broker or zookeeper configured at port 29092, so what is that doing?</li>
  </ol>