title: Running multi-broker config with docker and log4j to send messages: Fail-over handling isn't clear
body: <p>I've got the following docker (docker-compose.yml) configuration:</p>
  <pre><code>  networks: 
      brdgNet:
        name: brdgNet
  
    services:
      brdg-zookeeper:
        image: confluentinc/cp-zookeeper:5.5.0
        container_name: brdg-zookeeper
        logging:
          driver: &quot;json-file&quot;
          options:
            max-size: &quot;2048m&quot;
        networks: 
          - brdgNet
        environment:
          ZOOKEEPER_CLIENT_PORT: 2181
  
      brdg-broker-one:
        image: confluentinc/cp-kafka:5.5.0
        container_name: brdg-broker-one
        logging:
          driver: &quot;json-file&quot;
          options:
            max-size: &quot;2048m&quot;
        networks: 
          - brdgNet
        restart: always
        ports:
          - &quot;19092:19092&quot;
        depends_on:
          - brdg-zookeeper
        environment:
          KAFKA_BROKER_ID: 1
          KAFKA_ZOOKEEPER_CONNECT: brdg-zookeeper:2181
          KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://brdg-broker-one:9092
          KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 2
          KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://brdg-broker-one:9092,CONNECTIONS_FROM_HOST://localhost:19092
          KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,CONNECTIONS_FROM_HOST:PLAINTEXT
  
      brdg-broker-two:
        image: confluentinc/cp-kafka:5.5.0
        container_name: brdg-broker-two
        logging:
          driver: &quot;json-file&quot;
          options:
            max-size: &quot;2048m&quot;
        networks: 
          - brdgNet
        restart: always
        ports:
          - &quot;19093:19093&quot;
        depends_on:
          - brdg-zookeeper
        environment:
          KAFKA_BROKER_ID: 2
          KAFKA_ZOOKEEPER_CONNECT: brdg-zookeeper:2181
          KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://brdg-broker-two:9093
          KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 2
          KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://brdg-broker-two:9093,CONNECTIONS_FROM_HOST://localhost:19093
          KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,CONNECTIONS_FROM_HOST:PLAINTEXT
  
      kafka-ui:
        image: provectuslabs/kafka-ui:master
        container_name: brdg-webui
        logging:
          driver: &quot;json-file&quot;
          options:
            max-size: &quot;2048m&quot;
        ports:
          - &quot;8080:8080&quot;
        networks: 
          - brdgNet
        restart: always
        depends_on: 
          - brdg-broker-one
          - brdg-zookeeper
        environment:
          - KAFKA_CLUSTERS_0_NAME=local
          - KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=brdg-broker-one:9092
          - KAFKA_CLUSTERS_0_ZOOKEEPER=localhost:2181
  </code></pre>
  <p>With the following in my log4j2.xml</p>
  <pre><code>    &lt;Appenders&gt;
          &lt;Kafka name=&quot;kafka-log&quot; 
                 topic=&quot;logInfo&quot; 
                 key=&quot;UniqueKey&quot;
                 syncsend=&quot;true&quot;
                 ignoreExceptions=&quot;false&quot;&gt;
              &lt;JsonTemplateLayout eventTemplateUri=&quot;classpath:JSONTemplate.json&quot;/&gt;
              &lt;Property name=&quot;bootstrap.servers&quot;&gt;localhost:19092&lt;/Property&gt;
          &lt;/Kafka&gt;
      &lt;/Appenders&gt;
      &lt;/Loggers&gt;
          &lt;Logger name=&quot;logInfo&quot; level=&quot;INFO&quot; additivity=&quot;false&quot;&gt;
              &lt;AppenderRef ref=&quot;kafka-log&quot;/&gt;
          &lt;/Logger&gt;
      &lt;/Loggers&gt;
  </code></pre>
  <p>When i take out brdg-broker-one (with docker kill), I get errors trying to send from log4j and I can't view any topics on the ui anymore. Are there further configuration items I should be putting in there to get the second broker to handover during failure?</p>
  <p>It was my initial understanding that so long as the first broker is up at start-up it would transfer the other nodes configuration through. Is that wrong?</p>