title: KAFKA-NODE: manage multiple consumer groups
body: <p>I have a question about managing multiple CG's, created three consumer groups, every CG has its own kafka service, group Id and topic.</p>
  
  <p>now i'm receiving messages as expected, but, i wondering if its possible to create next scenario:</p>
  
  <p>create three consumer groups, but receive messages only from one,put others on pause/hold for now, if his kafka service will fall, consume messages from next consumer group, and same with the third.</p>
  
  <p>Here's an example for my code:</p>
  
  <pre class="lang-js prettyprint-override"><code>function createConsumerGroup(topics){
  
      const ConsumerGroup = kafka.ConsumerGroup;
  
      //CREATE CONSUMER GROUPS FOR EVERY SERVICE
      for(let i = 0; i &lt; config.kafka_service.length ;i++){  //3
  
          const options = {
              groupId: config.kafka_service[i]['groupId'],
              host: config.kafka_service[i]['zookeeperHost'],
              kafkaHost: config.kafka_service[i]['kafkaHost'],
              sessionTimeout: 15000,
              protocol: ['roundrobin'],
              fromOffset: 'latest'
          }
  
          //assign all services CG names and create [i] consumer groups!
          let customConsumerGroupName = config.kafka_service[i]['consumerGroupName'];
  
          customConsumerGroupName = new ConsumerGroup(options, topics);
  
          customConsumerGroupName.on('connect', (resp) =&gt; {
              console.log(`${config.kafka_service[i]['consumerGroupName']} is connected!`);
          });
  
          if(i &gt; 0){
              //pause consumers exept FIRST
              customConsumerGroupName.pause();
          }
  
  
          customConsumerGroupName.on('message', (message) =&gt; {
             console.log(message);
          });
  
          customConsumerGroupName.on('error', (error) =&gt; {
              console.log('consumer group error: ', error);
  
             //HERE I NEED TO CALL SECOND CONSUMER TO STEP UP
             //MAYBE consumerGroup.resume(); ???
          });
  
      }
  }
  </code></pre>
  
  <p>hopes its sound understandable, thanks :)</p>