We are using Springboot Kafkalistner annotation to listen to a Kafka topic. In the consumer config, i have set ack mode to COUNT_TIME with the ackCount at 2000 and ackTime to 1 minute and the listener is polling for 100 messages at a time (max.poll.records=100). I have created this config to handle more time for the batch of listeners to process and the 1 minute to handle any scenario when the count is not met so we don't end up waiting forever.
With this, I published about 500K messages to this topic. My expectation was that the offset commit to happen every 2000 messages consumed and the messagesBehind count for the consumer group to go down in decrements of 2000. However, I see the messages behind stay very high and they went down from 500K to 380K to 250K to 125K to 0. I did not see any intermediate counts. Does that mean the offsets are not happening on every 2000 messages and instead happening only for around 100K messages at a time? Is this expected? What would be the impact on this to the broker, if any? how do we address this?
Thank you