I am working on developing a Kafka Consumer, for which I need to poll some limited records from the Kafka channel at a time. I have set the property max.poll.records = 10, but when I start my consumer, I see that it reads all the unread messages from the Kafka at once. I am not sure why the property is not working, even though I can see the property displayed in the config logs when the Java Kafka Consumer starts. Below are some of the configs I have:
allow.auto.create.topics = true
auto.commit.interval.ms = 5000
auto.offset.reset = earliest
enable.auto.commit = false
fetch.max.bytes = 52428800
fetch.max.wait.ms = 500
fetch.min.bytes = 1
heartbeat.interval.ms = 3000
max.partition.fetch.bytes = 1048576
max.poll.interval.ms = 300000
max.poll.records = 10
Any help is appreciated.