I'm using spring boot 2.1.7.RELEASE and spring-kafka 2.2.7.RELEASE.And I'm using @KafkaListener annotation to create a consumer and I'm using all default settings for the consumer.
As per the apache kafka documentation, the default value for 'max.poll.records' is 500.
Here I'm trying to understand, how spring is handling the records processing. Now my question is, If we have already published 500 messages onto a Topic A and have a consumer (using @KafkaListener) subscribed to this topic ,
- Does this spring listener would get all those 500 records and then is doing some kind of caching before passing one by one record to the method annotated with @KafkaListener or would it pull only one record at once and pass that to the method with @KafkaListener annotation