I am using Spring Boot @kafkaListener in my application. Lets assume I use below configuration -
Topic Partitions : 2
spring.kafka.listener.concurrency : 2
group-id : TEST_GRP_ID
Acknowledgement : Manual
My question is ,
As per my knowledge Concurrency will create parallel thread to consume message. So,
thread 1consumed the batch of records andthread 2consumed the batch of records in this case processing of the messages will sequential and then commit the offset?If I have two instances of the micro service in my cloud environment (in production more partition and more instances), then how
concurrencywill work? In each instance will create two parallel thread for my Kafka consumer?
How can I improve performance of my consumer or how can I make fast consumption and processing of the messages?