title: Apache Kafka: 3 partitions, 3 consumers in the consumer group, each consumer should be multithreaded
body: <p>Lets say there is a topic in <code>Apache Kafka</code> with 3 partitions. I need to run 3 consumers inside a consumer group and, according to the documentation, it means each consumer will read data from 1 partition.</p>
  
  <p>Consumers are implemented using <code>Spring Kafka</code>. As we all know, by default all messages are received in a single thread, but using <code>ConcurrentMessageListenerContainer</code> should allow us to set up concurrency.</p>
  
  <p>What I want? I want to use server CPU resources efficiently and make each consumer to receive and process messsages in separate threads (3 threads in our case, which is equal to the number of partitions).</p>
  
  <p>As a result - 3 consumers (3 servers) in the consumer group and each consumer receives messages from all 3 partitions. </p>
  
  <p>Is it possible? If yes, will it be enough if I just use <code>ConcurrentMessageListenerContainer</code>and specify 3 listeners for each partition?</p>