title: How to disable KAFKA consumer being autostarted without having to make any code changes including setting the autoStartup = "{xyz}" in Spring Boot?
body: <p>Below is my KAFKA consumer</p>
  <pre><code>@Service
  public class Consumer {
  
      private static final Logger LOGGER = Logger.getLogger(Consumer.class.getName());
      public static Queue&lt;ProductKafka&gt; consumeQueue = new LinkedList&lt;&gt;();
  
      @KafkaListener(topics = &quot;#{'${spring.kafka.topics}'.split('\\\\ ')}&quot;, groupId = &quot;#{'${spring.kafka.groupId}'}&quot;)
      public void consume(ProductKafka productKafka) throws IOException {
          consumeQueue.add(productKafka);
          LOGGER.info(String.format(&quot;#### -&gt; Logger Consumed message -&gt; %s&quot;, productKafka.toString()));
          System.out.printf(&quot;#### -&gt; Consumed message -&gt; %s&quot;, productKafka.toString());
      }
  }
  </code></pre>
  <p>and below is my &quot;application.properties&quot; file</p>
  <pre><code>spring.kafka.topics=Product
  spring.kafka.groupId=Product-Group
  </code></pre>
  <p>My KAFKA consumer is getting started automatically.</p>
  <p>However I want to <strong>disable KAFKA consumer being autostarted without having to make any changes to the existing code</strong> including setting <strong>autoStartup = &quot;{xyz}&quot;</strong> in the consumer class due to the requirement.</p>
  <p>I am looking an existing properties which would disable KAFKA consumer being autostarted, something like this</p>
  <pre><code>spring.kafka.consumer.enable=false
  </code></pre>
  <p><strong>Note:</strong> I have multiple KAFKA consumers and the above property should disable all the consumers in the project.</p>
  <p>do we have any existing properties which would disable KAFKA consumer being autostarted without having to make any changes to the existing code?</p>