title: Prevent kafka consumer from timing out for long process
body: <p>I need to prevent the kafka consumer from timing out while the application waits for a particular process to complete. My approach is to pause the partitions and then resume them once the process is completed.</p>
  
  <pre><code>List&lt;TopicPartition&gt; partitionList = new ArrayList&lt;&gt;(); 
  partitionList.addAll(kafkaConsumer.assignment());
  kafkaConsumer.pause(partitionList);
  
  while(//waiting for the process to complete){
      Thread.sleep(10000);                            
      kafkaConsumer.poll(0);
  }
  kafkaConsumer.resume(partitionList);
  </code></pre>
  
  <p>Questions</p>
  
  <p>Does pause send heartbeat to kafka automatically or should I still need to poll at regular intervals to send the heart beat?</p>
  
  <p>Is mine the best approach ? or is there a better way of doing it?</p>