Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

KafkaListener partition mapping within instance for concurrency > 1

I have a simple kafka listener annotated method
and spring.kafka.listener.concurrency = 5

My topic has 100 partitions, and there are 5 instances of the application running.
The topic has partition keys set, so the consumer level partition affinity exists.
I would like to understand if its possible for multiple threads of the consumer to receive messages from the same partition.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

No; with concurrency = 5, each instance has 5 distinct consumers; only one consumer in a group can consume from a partition.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading