title: Mirrormaker2 : KafkaJSProtocolError: The group member's supported protocols are incompatible with those of existing members
body: <p>I am trying to setup mirrormaker . I have dockerised the mirrormaker process.
  I have two kafka clusters running on the same machine.</p>
  <p>Kafka dockers are below</p>
  <pre><code>version: '2.1'
  services:
    zookeeper:
      image: bitnami/zookeeper:3.6.1-debian-10-r41
      ports:
        - &quot;2181:2181&quot;
      environment: 
        ALLOW_ANONYMOUS_LOGIN: &quot;yes&quot;  
        
    kafka:
      image: bitnami/kafka:2.5.0-debian-10-r63
      container_name: kafka
      depends_on:
        - &quot;zookeeper&quot;
      ports:
        - &quot;9092:9092&quot;
      environment:
        DOCKER_API_VERSION: 1.22
        KAFKA_ADVERTISED_HOST_NAME: 10.128.0.34
        KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://10.128.0.34:9092
        KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
        KAFKA_BROKER_ID: 1
        KAFKA_CREATE_TOPICS: &quot;test&quot;
        KAFKA_ADVERTISED_PORT: 9092
        ALLOW_PLAINTEXT_LISTENER: &quot;yes&quot;
        KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
   
  </code></pre>
  <p>Second kafka docker</p>
  <pre><code>version: '2.1'
  services:
    zookeeper1:
      image: bitnami/zookeeper:3.6.1-debian-10-r41
      ports:
        - &quot;2182:2181&quot;
      environment: 
        ALLOW_ANONYMOUS_LOGIN: &quot;yes&quot;
    
    kafka1:
      image: bitnami/kafka:2.5.0-debian-10-r63
      container_name : kafka1
      depends_on:
        - &quot;zookeeper1&quot;
      ports:
        - &quot;9093:9092&quot;
      environment:
        DOCKER_API_VERSION: 1.22
        KAFKA_ADVERTISED_HOST_NAME: 10.128.0.34
        KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://10.128.0.34:9093
        KAFKA_ZOOKEEPER_CONNECT: zookeeper1:2181
        KAFKA_BROKER_ID: 1
        KAFKA_CREATE_TOPICS: &quot;test&quot;
        KAFKA_ADVERTISED_PORT: 9093
        ALLOW_PLAINTEXT_LISTENER: &quot;yes&quot;
        KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
        
  </code></pre>
  <p>As you can see above one is running on <code>9092</code> and another on <code>9093</code></p>
  <p>I have <code>consumer.properties</code> as below</p>
  <pre><code>bootstrap.servers=10.128.0.34:9092
  group.id=my-test-app
  exclude.internal.topics=true
  #mirror.topics.whitelist=test
  client.id=my-test-app
  partition.assignment.strategy=org.apache.kafka.clients.consumer.RangeAssignor
  
  </code></pre>
  <p>and <code>producer.properties</code> as below</p>
  <pre><code>bootstrap.servers=10.128.0.34:9093
  acks=1
  batch.size=100
  client.id=my-test-app
  partition.assignment.strategy=org.apache.kafka.clients.producer.RangeAssignor
  </code></pre>
  <p>When I try to publish messages to <code>kafka on 9092</code> , I get the below error</p>
  <pre><code>KafkaJSProtocolError: The group member's supported protocols are incompatible with those of existing members&quot;,&quot;groupId&quot;:&quot;my-test-app&quot;,&quot;stack&quot;:&quot;KafkaJSProtocolError: The group member's supported protocols are incompatible with those of existing members
  
  </code></pre>
  <p>can someone help me resolve this. Please ask me for more details if required</p>