title: Spring boot consumer without using @Kafkalistener
body: <p>I am trying to write kafka consumer without using @Kafkalistener  and below are the lines of code that I am using for configuring listener:</p>
  
  <pre><code>@Configuration
      @EnableKafka
      public class KafkaConfig {
  
        @Value("${kafka.bootstrap-servers}")
        private String bootstrapServers;
  
        @Bean
        public Map&lt;String, Object&gt; consumerConfigs() {
          Map&lt;String, Object&gt; props = new HashMap&lt;&gt;();
          // list of host:port pairs used for establishing the initial connections to the Kafka cluster
          props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG,
              bootstrapServers);
          props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG,
              StringDeserializer.class);
          props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG,
              StringDeserializer.class);
          // allows a pool of processes to divide the work of consuming and processing records
          props.put(ConsumerConfig.GROUP_ID_CONFIG, "org");
          // automatically reset the offset to the earliest offset
          props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
  
          return props;
        }
  
        @Bean
        public ConsumerFactory&lt;String, String&gt; consumerFactory() {
          return new DefaultKafkaConsumerFactory&lt;&gt;(consumerConfigs());
        }
  
        @Bean
        public KafkaListenerContainerFactory&lt;ConcurrentMessageListenerContainer&lt;String, String&gt;&gt; kafkaListenerContainerFactory() {
            ContainerProperties containerProperties=new ContainerProperties("in.t");
          ConcurrentKafkaListenerContainerFactory&lt;String, String&gt; factory =
              new ConcurrentKafkaListenerContainerFactory&lt;&gt;();
          factory.setConsumerFactory(consumerFactory());
  
          return factory;
        }
  
        @Bean
        public Consumer receiver() {
          return new Consumer();
        }
      }
  </code></pre>
  
  <p>Here how can I configure the topic and listener method and my consumer class can have multiple methods .</p>
  
  <p>Also, wanted to know if there are any potential issues faced while using @kafkalistener with kafka streams.</p>
  
  <p>PS: I don't want to use @KafkaListener.</p>