intermediateConsumer Timing Configurations
Why does increasing `max.poll.records` improve throughput but also increase the risk of rebalance-triggered reprocessing?
A higher `max.poll.records` means each `poll()` call returns more messages to process before the next `poll()`, improving batch efficiency — but processing a bigger batch also takes longer, increasing the odds of exceeding `max.poll.interval.ms` if the batch's total processing time isn't accounted for, which can trigger an unwanted rebalance mid-batch.
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response