In Kafka what happens to the record which takes more time than the max.poll.interval.ms

What happens to the long processing record when max.poll.interval.ms time exceeds will it run in the background and rebalancing will be triggered . As per my limited understanding the kafka consumer( Spring kafkalistener) service gets halted / restarted and the records get assigned to other consumers in the group during rebalancing


You will have records left in memory being processed if the application or processing logic doesn't stop with the consumer thread.

If offsets were committed beforehand, those records would effectively be skipped after a rebalance. Otherwise, those offsets ideally shouldn't be committed post-processing since those records might be tried to be processed again, potentially resulting in data duplication, by other consumers after a rebalance.